Tracking forum activity

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Zada
Forum Newbie
Posts: 3
Joined: Mon Mar 27, 2006 10:48 pm

Tracking forum activity

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Zada
Forum Newbie
Posts: 3
Joined: Mon Mar 27, 2006 10:48 pm

Post by Zada »

Are there instructions to exactly how to do that?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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
Zada
Forum Newbie
Posts: 3
Joined: Mon Mar 27, 2006 10:48 pm

Post by Zada »

Okay, thanks. I'll try that.
Post Reply