Jump to content

Get time till Cookie Expires


ionik

Recommended Posts

Ok what i have is a session management script that handles user sessions store infromation in database and sets cookies for the current session

what i've run into is everytime a logged in user refreshes or visits a new page it updates the cookie information to set the lastactivity timestamp of the user

the problem i've run into is if the user has chosen to remain logged in their next visit when i re-set the userdata cookie the expiration time will be reset also and the is no way to determain if the user has chosen to remain logged in....

So is there any way to get the times that the cookie will expire or time until a cookie expires?

Link to comment
https://forums.phpfreaks.com/topic/91110-get-time-till-cookie-expires/
Share on other sites

Why don't you track their time in a DB instead of a Cookie?  I know I would delete any tracking cookies on my PC.

 

simple....reduce the number of queries needed when a page loads.....if i stored it in the db i would need a minimum of 2 queries ran just to get the info

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.