View Full Version : set cookie 5 hours

08-27-2011, 02:00 AM
Hi, i need to set a cookie to expire in 5 hours. I normally use an hour at +3600 but i have never done 5 hours before so will this work or should i use a different value.

setcookie("Sitecheck", $value, time()+18000);

08-27-2011, 04:24 AM
That's exactly correct.

It will be based off of your server timezone, not the user's timezone.

If that's important, you can force the timezone to be whatever you wish.