Page 1 of 1

Session Expiry

Posted: Sat Jul 26, 2008 4:18 am
by eskio
Hi,

I designed a page using sessions. For security purpose, I want that when the user leaves the page for example 5 minutes, I want the session to expire. I want to know if there is a way to know when the page is idle for a certain amount of time?

Thanks.

Re: Session Expiry

Posted: Sat Jul 26, 2008 6:15 pm
by jaoudestudios
store the unix timestamp in another session and check this with the current time stamp

use...

Code: Select all

time()

Re: Session Expiry

Posted: Mon Jul 28, 2008 4:34 am
by eskio
Thanks

Re: Session Expiry

Posted: Wed Aug 13, 2008 5:33 am
by devendra-m
or you can set session.gc_maxlifetime =300 in php.ini