Click here to Skip to main content
15,888,242 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Peoples,

I will straight away jump into the question first.

Lets assume I have a website http://www.ihaveasite.com/
and I have a CMS for that site http://www.ihaveasite.com/admin/

now, in the admin section I want to have a page where it will display all the visitors list who are currently present or visiting my site.

Basically I know this has something to do with Javascript, I don't need the code I just need a general concept on how to do this. Because I have google it in many ways, but I guess I am not doing it with the right keyword.

I am developing a WordPress Plugin in the same concept, so I need help. Any suggestion would be highly appreciable.

Regards.
Posted

1 solution

You problem is simple: how to define a "visitor"?

If people are not registered on your site, just visit, they don't identify themselves. They simply send HTTP requests; and the site responds with HTTP response. Even though you can inspect HTTP request's IP and some detail like claimed type of the browser (if any), it does not tell you anything about the person. Moreover, most client IPs will be dynamic, so the same visitor with the same computers will be identified differently, but such visitor can also use different computers at different locations. And different users will share the same IPs.

So, you only can identify visitors if they are authenticated users. And you can only count a visitor after she/he is authenticated.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900