pagegen Posted December 1, 2010 Share Posted December 1, 2010 Hi guys Just wanted to knw whats the php logic needed to create this function which shows current users viewing a topic I knw we can have a database table which stores the topic ID as well as user id and that way we can record who is viewing a topic but what happens when they leave? some users can just close there browser in which case I would never know when they left? thank you guys Quote Link to comment Share on other sites More sharing options...
trq Posted December 1, 2010 Share Posted December 1, 2010 some users can just close there browser in which case I would never know when they left? Indeed they can. You also need to include a timestamp and every time you update the table, check for entries older than say 10 minutes and remove them. Its safe to say these users have left or are at least inactive. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.