View Single Post
Old 2017-02-02, 15:23   #1191
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013

32·317 Posts
Default

Look into the set_session_save_handler function of PHP. A common practice is to store sessions in a database. Update a last-used field every hour or so (check in the write handler if it's been an hour if there are no other data changes), then run a scheduled task to delete sessions where last-used is a month old or whatever.
Mark Rose is offline   Reply With Quote