Forum Moderators: coopster
-khanh
most users probably won't logout so what you need is a script that goes through and cleans up anything that is old.
This way you can just query that database for active users.
Another you may want is to update the time in the current_users table eveytime a user hits a new page. This keeps the users that are active, well, active.
your cleanup script can then delete anything in the table that has a time over 30 minutes, say, though it could be any amount you like. Just don't make it too short, give people time to read.