Possible Duplicates:
script to tell me who, and how many users, are online
Best way to keep track of current online users
How should I count the people online on a PHP website at a given time, if they don’t have to be logged-in?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use a cookie to identify unique users, and then just keep track of the last time accessed a PHP page. Then come up with a timeout mechanism – for example, if they have not accessed a page in 15 minutes then they are removed from the count.