使用什么数据源进行 IP 到位置转换?
问题:
- 我有用户的IP地址,我想根据他的IP地址找出他的位置
,现在可能的解决方案:
- ip2location.com
- maxmind.com
以上网站免费提供IP到位置查找服务。还有一些付费提供商。
那么,是否有一些应该使用的标准开放数据库?您总是需要专有的数据源来查找位置吗?
是否有一些标准的开放数据源? (由 apnic、afrinic 等提供)
Problem :
- I have the IP address of the user, I want to find out his location based on his IP Address
Now, Possible Solution :
- ip2location.com
- maxmind.com
Above sites provide the IP to location lookup service for Free. And there are some paid providers also.
So, is there some standard open database that one should use. You need a proprietary data sources to lookup the location always ?
Is there some standard open data sources ? (Provided by apnic, afrinic, etc)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我在某处读到 W3C 正在做类似的事情,但仍然没有标准的开放数据源,但它仍在进行中。
更新:
这是我正在谈论的数据库:
http ://labs.ripe.net/Members/denis/example-usage-of-ripe-database-geolocation-prototype
There is still no standard open data sources I have read somewhere that W3C is in the process of doing something like this, but it is still in the process.
Update:
Here it is the database I was talking about:
http://labs.ripe.net/Members/denis/example-usage-of-ripe-database-geolocation-prototype
Hostip,非常准确。就这样吧。
http://www.hostip.info/use.html
Hostip, Is very accurate. Go with this.
http://www.hostip.info/use.html
您需要最好的位置还是乡村就足够了?
如果基于国家/地区的检测就足够了,您可以从以下位置下载国家/地区 IP 范围
http://www.ipaddresslocation.org/ip_ranges/get_ranges.php
并自行检查位置(在您自己的代码中)。
该解决方案的优点是速度非常快,并且您不依赖外部服务。
Do you need the finest possible location or does the Country enough?
If Country based detection is suffices than you can download the Country IP ranges from
http://www.ipaddresslocation.org/ip_ranges/get_ranges.php
and check the location on your own (in your own code).
Pro to this solution is that this is very fast and you dont rely on external services.
IME、准确性和分辨率差异很大,即使使用更好的系统,我也不相信低于大约 400 英里的平均准确性。
这里有一个免费数据库。 IME,这里的国家识别准确率约为 93%,并且它们提供了有关为什么某些数据似乎不一致/不准确的高质量信息。
但如果您的用户可能选择加入,则使用 HTML5 地理定位 api 将提供更好的分辨率。另一种方法是使用 Google 或 Yahoo 的 API 将文本地址和/或邮政编码映射到某个位置。
IME, accuracy and resolution vary greatly, and even using the better systems I'd not trust the accuracy below an average of about 400 miles.
There's a free database here. IME, the country identification in here is around 93% accurate, and they provide good quality information about why some of the data appears to be inconsistent/innaccurate.
But if your users are likely to opt-in, then using the HTML5 geolocation api will give much better resolution. Another approach would be to use Google or Yahoo's APIs to map a text address and/or post/zip code to a location.