PDA

View Full Version : Display Current Users Online



Darin
July 30th, 2001, 12:02
Hello,

My friend has this code on his site, to display the current users online. It's a PHP include, can someone help me out? I can't seem to find this code anywhere. I'm not looking to use a MySQL database to track everyone on the site, although that would be nice if it can be done simply, but I just need the code to display the users on a certain page.

LastActionHero
July 30th, 2001, 12:16
ask your friend? :)

atlas
July 30th, 2001, 17:01
Why are there two of these threads?

----

It's not that hard. These types of sites have people log in and get a session. So all you have to keep track of is the list of people that are currently logged in.

The easiest method is to keep updating the expiration of the session ahead 30 minutes from the current time each time a user accesses a page. Then after they stop accessing pages their session is deleted -- and therefore removed from the "who is logged in" page.

Anyway, that's the basic idea.

-mk
atlascgi.com

Darin
July 30th, 2001, 17:05
No no, the site I know of, doesn't require anybody to login. http://www.thesimsdimension.com/

lucifer
July 30th, 2001, 17:10
people will be 'logged' into your site they may not do anything to do this as it would be transparent.

your site needs to tell people apart - session tracking. this must be understood to do what you want