Page 1 of 1
Tracking forum activity
Posted: Mon Mar 27, 2006 10:51 pm
by Zada
Hi. I have a php forum and am pretty new to using it. Is there a way to track users that have been online .. say in the last 24 hours, etc? I know how to see the IP's of the ones who are online, but I need to know who has BEEN online. Help?
Posted: Mon Mar 27, 2006 10:55 pm
by feyd
That may well depend on the forum you're running. With phpBB, you'll need to run a query against the database as it doesn't have a built-in display for that. The field to use would be last_session_time I believe from the *_users table. The stored timestamp is a unix timestamp adjusted to GMT time, from what I remember.
Posted: Mon Mar 27, 2006 11:04 pm
by Zada
Are there instructions to exactly how to do that?
Posted: Mon Mar 27, 2006 11:17 pm
by feyd
Code: Select all
SELECT `username` FROM `_users` WHERE `user_session_time` > '{$someTime}'
What $someTime is, you can set. It will be a result from
mktime(),
time(),
gmmktime() or several of the other timestamp returning functions
Posted: Mon Mar 27, 2006 11:26 pm
by Zada
Okay, thanks. I'll try that.