kellz Posted November 13, 2007 Share Posted November 13, 2007 How would i know how many users are logged in to their profile? i have a login script and when they login they get to their profile, but at the home page i want the visitors to know how many people are currently active.. Link to comment https://forums.phpfreaks.com/topic/77229-solved-how-to/ Share on other sites More sharing options...
recklessgeneral Posted November 13, 2007 Share Posted November 13, 2007 Hi, This tutorial looks like it might be useful: http://www.phpfreaks.com/tutorials/62/0.php Cheers, Darren. Link to comment https://forums.phpfreaks.com/topic/77229-solved-how-to/#findComment-390997 Share on other sites More sharing options...
kratsg Posted November 13, 2007 Share Posted November 13, 2007 Here's how. Get the current timestamp [time()] for the user when they load the profile page. Insert this current timestamp into the database (in the users table I hope) Do a mysql_query() where the the current timestamp minus the timestamp in the database is less than a certain amount of time (this gets all users active in this certain amount of time). Display the results, done. Link to comment https://forums.phpfreaks.com/topic/77229-solved-how-to/#findComment-391002 Share on other sites More sharing options...
kellz Posted November 13, 2007 Author Share Posted November 13, 2007 okies.. thx Link to comment https://forums.phpfreaks.com/topic/77229-solved-how-to/#findComment-391041 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.