Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Cookie expiry problem
09-05-2007, 07:29 AM #1
- Join Date
- Mar 2006
- Thanked 0 Times in 0 Posts
Cookie expiry problem
I'm making a system which creates generates a download link which is active for one hour only. I wanted to make it cookie based, but I'm having troubles setting the expiry time of the cookie correctly:
$timestamp = time();
$expires = $timestamp + 3600;
setcookie("DOWNLOAD_ID", $hash, $expires);
In IE and Opera it sets the expiry time to one hour in GMT.
The server is in the same timezone as the client machine (for now). How to I make sure that the expiry time of the cookie is set to 1 hour in local time ?