Jonas ? wrote: > 1. I'm building this community thing and I have a text file with the > users that is currently logged in. When they press logout there name > is deleted from the textfile, but if they just close there browser or > surf to another site there name is still in the text-file until they > log out next time. Any ideas how to avoid this?
What you should do is save for each user the last time he was "seen" in the site: the value of this time is updated for each page he or she loads. Then, when checking to see if a user is currently logged in, you check how long ago was he last seen. If it was more than X seconds/minutes/etc. (this is for you to set), she is considered "offline" and you can remove him from the file. Best Regards, Sagie Maoz [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php