[PHP] Re: Serious problem with Cookies..

2001-11-15 Thread _lallous

you must set the cookie's expiry time!

of-the manual:
setcookie (TestCookie, Test Value);
setcookie (TestCookie, $value,time()+3600);  /* expire in 1 hour */
setcookie (TestCookie, $value,time()+3600, /~rasmus/, .utoronto.ca,
1);

Phpgalaxy.Com [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I started an affiliate program to sell my scripts, and it uses cookies
 for tracking..  I didnt know it at the time, but as soon as the web
 browser's closed, the cookie info is gone. g! I need it to stay
 there *permanently*! =) Here's the code I have no for both setting and
 retrieving..

 retrieving: $refid = $HTTP_COOKIE_VARS[refid];
 setting: setcookie (refid, $id);

 Am I just missing something I didnt see on php.net? =)


 --
 From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
 and Software on your Site. http://www.phpgalaxy.com/aff/

 Also, get a fast free POP3 email account, you @php.la at
 http://www.phpgalaxy.com/search/





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Serious problem with Cookies..

2001-11-15 Thread PHPGalaxy.com

yeah I saw that bit on there, but I was led to believe tha by leaving it out,
it would make the cookie permanent...I see thats not true =)  so what would I
do to make this permanent? or would I just set it for the highest time-limit
possible? =)


_lallous wrote:

 you must set the cookie's expiry time!

 of-the manual:
 setcookie (TestCookie, Test Value);
 setcookie (TestCookie, $value,time()+3600);  /* expire in 1 hour */
 setcookie (TestCookie, $value,time()+3600, /~rasmus/, .utoronto.ca,
 1);

 Phpgalaxy.Com [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I started an affiliate program to sell my scripts, and it uses cookies
  for tracking..  I didnt know it at the time, but as soon as the web
  browser's closed, the cookie info is gone. g! I need it to stay
  there *permanently*! =) Here's the code I have no for both setting and
  retrieving..
 
  retrieving: $refid = $HTTP_COOKIE_VARS[refid];
  setting: setcookie (refid, $id);
 
  Am I just missing something I didnt see on php.net? =)
 
 
  --
  From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
  and Software on your Site. http://www.phpgalaxy.com/aff/
 
  Also, get a fast free POP3 email account, you @php.la at
  http://www.phpgalaxy.com/search/
 
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Serious problem with Cookies..

2001-11-15 Thread Magnus

Den 01-11-15 13.20, skrev PHPGalaxy.com [EMAIL PROTECTED]:

 yeah I saw that bit on there, but I was led to believe tha by leaving it out,
 it would make the cookie permanent...I see thats not true =)  so what would I
 do to make this permanent? or would I just set it for the highest time-limit
 possible? =)

If you set it like this:
?
$hour = 3600;   // One hour
$day = $hour * 24;  // One day
$year = $day * 365; // One year
$year = $year * 2;  // 2 years
setcookie (TestCookie, $value,time()+$year);  // Expire in 1 year
?

There is not a good way to set a permanent cookie, the user can always
delete them if he wants to.

Thanks.
/Magnus Hammar


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Serious problem with Cookies..

2001-11-15 Thread PHPGalaxy.com

well yeah, thats always true..but this's at least as good as it gets =)  ya suppose
there's any limit on how many years I can set it for? hell, I'll just set it for 10
years and that'll be good enough =)


Magnus wrote:

 Den 01-11-15 13.20, skrev PHPGalaxy.com [EMAIL PROTECTED]:

  yeah I saw that bit on there, but I was led to believe tha by leaving it out,
  it would make the cookie permanent...I see thats not true =)  so what would I
  do to make this permanent? or would I just set it for the highest time-limit
  possible? =)

 If you set it like this:
 ?
 $hour = 3600;   // One hour
 $day = $hour * 24;  // One day
 $year = $day * 365; // One year
 $year = $year * 2;  // 2 years
 setcookie (TestCookie, $value,time()+$year);  // Expire in 1 year
 ?

 There is not a good way to set a permanent cookie, the user can always
 delete them if he wants to.

 Thanks.
 /Magnus Hammar

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Serious problem with Cookies..

2001-11-15 Thread _lallous

Yes, I guess you can't make it foreever but you can give it a higher expiry
date.

Phpgalaxy.Com [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 well yeah, thats always true..but this's at least as good as it gets =)
ya suppose
 there's any limit on how many years I can set it for? hell, I'll just set
it for 10
 years and that'll be good enough =)


 Magnus wrote:

  Den 01-11-15 13.20, skrev PHPGalaxy.com [EMAIL PROTECTED]:
 
   yeah I saw that bit on there, but I was led to believe tha by leaving
it out,
   it would make the cookie permanent...I see thats not true =)  so what
would I
   do to make this permanent? or would I just set it for the highest
time-limit
   possible? =)
 
  If you set it like this:
  ?
  $hour = 3600;   // One hour
  $day = $hour * 24;  // One day
  $year = $day * 365; // One year
  $year = $year * 2;  // 2 years
  setcookie (TestCookie, $value,time()+$year);  // Expire in 1 year
  ?
 
  There is not a good way to set a permanent cookie, the user can always
  delete them if he wants to.
 
  Thanks.
  /Magnus Hammar
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

 --
 From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
 and Software on your Site. http://www.phpgalaxy.com/aff/

 Also, get a fast free POP3 email account, you @php.la at
 http://www.phpgalaxy.com/search/





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]