使用什么数据源进行 IP 到位置转换?

发布于 2024-12-09 00:10:40 字数 268 浏览 5 评论 0原文

问题:

  • 我有用户的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 技术交流群。

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

发布评论

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

评论(4

永言不败 2024-12-16 00:10:40

我在某处读到 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

兲鉂ぱ嘚淚 2024-12-16 00:10:40

Hostip,非常准确。就这样吧。

http://www.hostip.info/use.html

Hostip, Is very accurate. Go with this.

http://www.hostip.info/use.html

素手挽清风 2024-12-16 00:10:40

您需要最好的位置还是乡村就足够了?

如果基于国家/地区的检测就足够了,您可以从以下位置下载国家/地区 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.

辞别 2024-12-16 00:10:40

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.

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