At any forum , you can see if a specific member is online or offline, or generally , how can I detect online visitors accurately who are visiting my website at the moment ...

Thanks in advance

10 Years
Discussion Span
Last Post by diafol

That is typically done by logging the time when a given user (or a guest, if you want that) was last seen.
Once a user hasn't been seen for some predetermined amount of time, he is considered off line.

This is really the only reliable method, given the stateless nature of the web.


I think you can done this idea by session (for members)

like if session user is available so the user is here


IP address is unreliable.
DB sessions could be a way to go, although last_impression timestamp for logged on users can be used as a cut-down version. You need a clean up with these though (php script or MySQL trigger), unless you run a cron job every 20 minutes or so.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.