gigantorTRON Posted October 12, 2007 Share Posted October 12, 2007 Quick question for yas.. How would I could I go about creating a script to destroy idle sessions after X minutes?? I know that there's a variable in the php.ini file that relates to garbage collection that you can set to different time periods, but I left a session open all night and it was still active when I came back this morning. I'd like to kill sessions that have been idle for 15+ minutes. Quote Link to comment https://forums.phpfreaks.com/topic/72950-basic-session-question/ Share on other sites More sharing options...
darkfreaks Posted October 12, 2007 Share Posted October 12, 2007 create a $timestamp variable that gets the time and if the time is over 15 minutes have it use session destroy like if ($time>15) { session_destroy(); } Quote Link to comment https://forums.phpfreaks.com/topic/72950-basic-session-question/#findComment-367912 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.