log out

From: Date: Tue, 24 Jul 2001 16:42:57 +0000
Subject: log out
Groups: php.db 
Request: Send a blank email to php-db+get-10715@lists.php.net to get a copy of this message
Well, i'm having some trouble in here and i hope someone can help me... I'm using sessions to keep track of users on my website... Using this, i'm able to display the name of the users that are currently online... Here's the thing... When users get on the site a new session is opened and they get on the online list... For the logging out, i have a log out button that to the moment very few people have used... I've been looking for some kind of event that may be triggered when a session expires, so that i could change it and do what i need when a user logs out. Unfortunately i have not found anything like this. The way i found to do this was to have people visiting the site doing this job for me. Every time a page is requested it checks the time of the last page hit from every online user and if the difference to the current time is more than some default i specify, it puts it as offline. Another way was to have cron do this for me... But i still wonder if it's possible to have php sessions do this for me, as some kind of mechanism must exists for the session expires...

« previous php.db (#10715) next »