如何获得我的网站的实时访问者 [英] how to get the live visitors of my website

查看:86
本文介绍了如何获得我的网站的实时访问者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Peoples,



我会马上跳到问题中。



让我们假设我有一个网站http://www.ihaveasite.com/

我有一个CMS的网站http://www.ihaveasite.com/admin/



现在,在管理部分我想要一个页面,它将显示当前在场或访问我网站的所有访客列表。



基本上我知道这与Javascript有关,我不需要代码我只需要一个关于如何做到这一点的一般概念。因为我在很多方面谷歌它,但我想我没有使用正确的关键字。



我正在开发一个相同概念的WordPress插件,所以我需要帮助。任何建议都会非常值得赞赏。



问候。

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.

推荐答案

问题很简单:如何定义访客?



如果人们没有在您的网站上注册,只需访问,他们就不会表明身份。他们只是发送HTTP请求;并且站点响应HTTP响应。即使您可以检查HTTP请求的IP和某些细节(如声明的浏览器类型(如果有)),它也不会告诉您有关此人的任何信息。此外,大多数客户端IP将是动态的,因此具有相同计算机的相同访问者将被不同地识别,但是这样的访问者也可以在不同位置使用不同的计算机。并且不同的用户将共享相同的IP。



因此,只有访问者是经过身份验证的用户才能识别访问者。并且您只能在验证访问者后对其进行统计。



-SA
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


这篇关于如何获得我的网站的实时访问者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆