IP地理定位究竟有多精确? [英] Exactly how accurate is IP Geolocation?

查看:237
本文介绍了IP地理定位究竟有多精确?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的朋友设置了一个iPhone跟踪系统,这样他们就可以随时随地通过iPhone将他们的位置提交到我的网站 - 通过WiFi或手机数据。



该网站将使用Google地图进行协调,以便我的其他朋友可以跟踪他们的位置,但是,准确地将IP地址与Google地图进行协调是我所关心的,准确度如何它使用谷歌地图,通过IP地址跟踪位置?



我在考虑95%,但是这在一个相当准确的村庄进行了测试,但如果它在一个城市会发生什么?这会导致不准确的位置?



任何一种帮助表示赞赏。

解决方案

根据用户的ISP如何分配IP地址以及您正在使用的IP地理位置数据库,IP地理定位确实存在问题。例如,我制作了一个简单的PHP脚本, IP2FireEagle ,它查找您的IP。我发现数据库一直把我放在距离我真正居住的地方西部10公里的地方。在主机IP 中更新我的条目并不是最好的,因为它很快就会恢复,大概是偶尔分配给某人的人该IP由我的ISP提供!话虽如此,我发现克拉克具有 的精确坐标(这不是说它使用IP地理定位本身,而是使用Skyhook的API和他们的WiFi地理定位数据库)。

如果它是一个给你的朋友的网站,并且你知道他们有iPhone,会建议使用其浏览器的支持 navigator.geolocation.getCurrentPosition()。也就是说,通过Javascript获取位置并通过AJAX调用将其提交给您的服务器。由于您希望使用Google地图,因此他们会为您提供短片教程,了解如何获得朋友的位置,然后更新地图。


I'm setting up a iPhone tracking system for my friends, so they can submit their location to my website by their iPhone, anywhere, anytime - by WiFi or cellular data.

The website will use Google Maps for their coordination's so that my other friends can track where they are, however, it is the accuracy of the IP to coordinates to Google Maps is what I'm concerned about, exactly how accurate is it to use Google Maps that would track down the locations by an IP address?

I was thinking about 95%, but this was tested in a village which was quite fairly accurate, but what happens if it was in a city? Would this cause unaccurate locations?

Any kind help appreciated.

解决方案

IP geolocation is really hit-or-miss, depending on both how the user's ISP assigns IPs and on the IP geolocation database you're using. For instance, I made a simple PHP script, IP2FireEagle, which looks up your IP. I found that the database kept placing me 10+ km to the west of where I really was. Updating my entry in Host IP wasn't the greatest, as it soon got reverted, presumably by someone also occasionally assigned that IP by my ISP! That being said, I found that Clarke has very accurate coordinates (not that this it's using IP geolocation per se but rather Skyhook's API and their WiFi geolocation database).

If it's a website for your friends and you know they have iPhones, I would suggest using its browser's support for navigator.geolocation.getCurrentPosition(). That is, get the location via Javascript and submit it to your server via an AJAX call. Even better since you want to use Google Maps, they give you a short tutorial on how get your friends' locations and then update a map.

这篇关于IP地理定位究竟有多精确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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