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 Link to comment https://forums.phpfreaks.com/topic/220341-show-current-users-viewing-a-topic/ 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. Link to comment https://forums.phpfreaks.com/topic/220341-show-current-users-viewing-a-topic/#findComment-1141769 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.