Jump to content

What's a date cookie ?


jd2007

Recommended Posts

jd2007..

read the manual...

8 out of 10 of your questions are in the manual

 

I assume he means expire

setcookie — Send a cookie

Description

bool setcookie ( string $name [, string $value [, int $expire [, string $path [, string $domain [, bool $secure [, bool $httponly]]]]]] )

 

    The time the cookie expires. This is a Unix timestamp so is in number of seconds since the epoch. In other words, you'll most likely set this with the time() function plus the number of seconds before you want it to expire. Or you might use mktime(). time()+60*60*24*30 will set the cookie to expire in 30 days. If set to 0, or omitted, the cookie will expire at the end of the session (when the browser closes).

 

        Note: You may notice the expire parameter takes on a Unix timestamp, as opposed to the date format Wdy, DD-Mon-YYYY HH:MM:SS GMT, this is because PHP does this conversion internally.

 

        expire is compared to the client's time which can differ from server's time.

 

In addition please click solved on some of your topics.....

Link to comment
https://forums.phpfreaks.com/topic/66634-whats-a-date-cookie/#findComment-333849
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.