How to Count Online Users on a Website
Possible duplicates: a
script to tell me who and how many users are online
Best way to keep track of current online users
How can I count people online on a PHP website at the moment if they don't need to be registered?
a source to share
http://www.devarticles.com/c/a/PHP/The-Quickest-Way-To-Count-Users-Online-With-PHP/1/
I would say that on Google, you can find many scripts and articles related to your query.
a source to share
Just write the IP addresses along with the timestamp to a file. On page load, read this file, delete all entries for say 3 minutes, add current IP and count the lines, write the file back. Locking this file will be nice.
It's all. All of the other methods listed here are simply overpowered for such a trivial thing, imprecise in design, regardless of the method you use.
a source to share