[RESOLVED]online visitors


I want to show how many visitors ONLINE at the current time.

How can I do that?

You can’t.  If you’re using a membership type system where people are logged in then you could try the technique detailed in this thread


Thank you for your information and technique.

I used Joomla, it was very easy to show online users (Just adding a plugin). I cannot believe that it is not possible to show online users at the current time. Why?

Because the web is stateless, the server has no idea how many people are "on line", it only knows people are there when they make a request.

All those numbers are guesstimate. (with some ass-umptions thrown in… like a user is online for 5 minutes, or 10 minutes, or x minutes)

If I visit your site, and leave quickly after 5 seconds, I’ll still be counted as "currently online" when in fact I’m not.  After x minutes passes by (or whatever number the algorithm has chosen), then my "count" will be removed from the stats.  

As AidyF said, the web is stateless. 

Leave a Reply