...

View Full Version : Session Ended



LynxGrr
06-02-2004, 08:02 PM
Hello,

As a relative newbie, Im writing a forum script to get some more practice in. Ive mangaed to get a php session started, but I was wondering how you detect the session being terminated?

What Im trying to achive is a list of the users who are currently logged in.

Thank you! Ian.

firepages
06-03-2004, 02:01 AM
the only reliable way to spot a user has ended a session without logging out is to keep track of sessions in a DB/flatfile & periodically clean that table out , e.g. everytime $user1 is spotted , update your db to note the time $user1 was spotted , then check for all users who have not been `spotted` for the last $x minutes and remove them from the DB.

LynxGrr
06-03-2004, 10:47 AM
Many thanks...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum