GeoIP 和 $_SERVER['REMOTE_ADDR'] 的准确度如何?
我为我的女朋友创建了一个网站,她最近想知道谁在访问她的网站。所以我使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据他们的网页,他们的数据库“在国家/地区级别上准确率为 99.8%”...
Well based on their web page their DB is "99.8% accurate on a country level" ...
在我在家获得 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 */
. )请始终保持二进制数据库更新,因为它会在每月的第一个星期二更新。
http://www.maxmind.com/app/geolite
Always keep your binary database updated as it is updated on the first Tuesday of every month.
http://www.maxmind.com/app/geolite