• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Who is online?

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
 
:)

Is there any where I can find out how the code works? CAn any of you guysd explain in PHP. Cause I'm making a BBS and I need to have that. Anyone who can do that for me will get credit! :)
 
step 1

setup a db

time/date | unique ID

step 2

each page checks for $ID if exists (and is valid) it updates the record in the db. If invalid or none creates new ID and stores in db

step 3

?$ID=xxxxx added to each link

that would work but you have session tracking don't you. just adapt that.
 
I doin't exactly understand. Is thre any way any of you guys can strip a piece of code from some where in PHP and show me?
 
Back
Top