GeoIP 和 $_SERVER['REMOTE_ADDR'] 的准确度如何?

发布于 2024-08-13 15:53:44 字数 282 浏览 4 评论 0原文

我为我的女朋友创建了一个网站,她最近想知道谁在访问她的网站。所以我使用 MindMax 的数据库,得到了按国家/地区划分的访问列表和计数。

然而,经过几天的监控,我们惊讶地发现,有些国家的访问并非该网站的目标国家。当然,这并不是说我认为那些国家的人不可能感兴趣,只是提出了一个准确性的问题。那么GeoIP和$_SERVER['REMOTE_ADDR'](用于查找)的准确度如何?

我不太关心那些故意隐藏或伪造他们的IP的人。我只是更想知道是否有什么东西可能会无意中使这个不准确(例如,路由)。

I make a website for my girlfriend and she recently wants to know who is accessing her site. So I use the database of MindMax and I got the list and count of access by country.

However, after monitoring it for a few days, it is comes to our surprise that there are accesses from some countries which the website is not target to. Of course, it does not means that I think it is impossible for people from those countries will be interested but it just rises a question of accuracy. So How accurate is GeoIP and $_SERVER['REMOTE_ADDR'] (which is used to look up)?

I don't care much about those who intentionally hide or fake their IP. I just more interested to know if there is thing out there that may unintentionally make this inaccurate (e.g., routing).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

心清如水 2024-08-20 15:53:44

根据他们的网页,他们的数据库“在国家/地区级别上准确率为 99.8%”...

Well based on their web page their DB is "99.8% accurate on a country level" ...

梦太阳 2024-08-20 15:53:44

在我在家获得 Wimax 服务后很长一段时间(几个月),GeoIP 都不知道我在哪里。我推测这是因为我的 ISP 使用的 IP 块是“新的”并且尚未映射到任何内容。

我注意到这一点是因为一个网站(试图通过告诉我我在哪里来表现得“可爱”)说了类似“你好,来自……的访客,实际上,我们不知道你来自哪里”。 (我想有一个关于 print 语句的评论,上面写着 /* 这永远不应该发生 */。)

There was quite a while (months) after I got Wimax service at home when GeoIP didn't have a clue where I was. I presume this is because the IP block that my ISP uses is "new" and hadn't been mapped to anything yet.

I noticed this because a website (that was trying to be "cute" by telling me where I was) said something like "Hello visitor from ... actually, we don't have a clue where you're from." (I imagine that there was a comment about that print statement that said something like /* This should never happen */. )

维持三分热 2024-08-20 15:53:44

请始终保持二进制数据库更新,因为它会在每月的第一个星期二更新。

GeoLite Country 和 GeoLite City 是免费的 IP 地理定位数据库,
每个月的第一个星期二更新。 GeoLite 和 GeoIP
数据库共享相同的格式和 API。

http://www.maxmind.com/app/geolite

Always keep your binary database updated as it is updated on the first Tuesday of every month.

GeoLite Country and GeoLite City are free IP geolocation databases,
updated on the first Tuesday of each month. GeoLite and GeoIP
databases share the same format and APIs.

http://www.maxmind.com/app/geolite

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文