Page 1 of 1
Who is Online?
Posted: Fri Jun 27, 2008 1:18 pm
by dyluck
Ok, this is one I have been struggling with. How do I keep track of logged in members who are online on my website.
Lets take this forum for example. It knows who is online. How does it work and what would I need to make this happen on my site.
Thanks!
Re: Who is Online?
Posted: Fri Jun 27, 2008 2:00 pm
by onion2k
Every time someone views a page there is a log of the time made against their user in the database. So me viewing this page would mean the timestamp for Onion2k will have been updated to 19:59. When the forum wants to write a list of who is online at the moment it queries the database to find anyone who has viewed a page in the last 5 minutes.
EDIT: Also, your signature is massive. Does it really need all that?
Re: Who is Online?
Posted: Fri Jun 27, 2008 2:35 pm
by dyluck
Haha yeah I suppose it is long
I will change it
Ok so it is a query based on time
Thanks for your help.