查找IP地址的地理位置 [英] Finding geographic location of IP address

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

问题描述

有没有人有一种有利的方法来查找地理位置

的用户IP地址,这样一个php脚本就可以包含内容

与之相关位置?


反向查找主机名是不可靠的,并且通常不会
工作,特别是如果返回的主机名以.com结尾,.net,

..info,.biz或其他没有透露地理位置的地址。


我也看到一堆商业服务提供country

whois订阅费用。你会认为这种

能力现在已经标准化了。


有人这样做吗?如果是这样,怎么样?


-A

解决方案

2007年8月16日星期四20:48: 58 +0200,axlq< ax ** @ spamcop.netwrote:


有没有人有一种寻找地理位置的优惠方式

用户的IP地址,以便php脚本可以包含与该位置相关的内容




反向查找主机名isn'是不可靠的,通常不会
工作,特别是如果返回的主机名以.com,.net,

.info,.biz或其他tld结尾不会透露地理位置。


我也看到一堆商业服务,提供国家

whois订阅费用。你会认为这种

能力现在已经标准化了。



很难。提供IP'与位置无关。这很难

保持最新状态。几乎没有任何机会真的可靠,而且肯定不是免费的。


有人这样做吗?如果是这样,怎么样?



使用由第三方更新的数据库,大部分时间信息更多或

更准确:

< http://www.maxmind.com/app/geolitecity>

-

Rik Wasmus

8月16日上午11:48,a ... @ spamcop.net(axlq)写道:


>

有没有人有一种优惠的方式来查找用户IP地址的地理位置

,这样一个php脚本可以包含与该位置相关的内容




不。 IP地址常常存在。美国的AOL用户似乎都是来自弗吉尼亚州的
。德国的AOL用户经常被视为来自英国的b $ b b。公司网络上的用户通常被视为位于公司总部甚至公司的电信公司

总部的


< blockquote class =post_quotes>
我还看到一堆商业服务提供country

whois订阅费用。你会认为这种

能力现在已经标准化了。



它是。将IP地址与位置匹配是基于WHOIS

信息完成的。但要获得并保持整个

互联网的当前WHOIS,您需要成为一个域名注册商或好朋友

一个。 :)另外,WHOIS反映谁拥有IP地址,而不是谁使用

它...


干杯,

NC


2007年8月17日星期五00:02:59 +0200,NC< nc@iname.comwrote:


>我还看到一堆提供country
whois的商业服务。订阅费用。你会认为这种能力现在已经标准化了。



它是。将IP地址与位置匹配是基于WHOIS

信息完成的。



他们可能会使用它们,然而,IP-adresses到国家(州,市)

并非完全由WHOIS信息完成。它通常是一个后备,如果

没有别的已知/确定。许多更可靠的消息来源

持续进行大规模的调查(你住在这里吗?如果没有,请告诉

我们你在哪里......) ,并从第三方获取信息,其中给出了

的IP地址和地理位置(例如,一些ISP和更大的在线商店

,尽管他们必须有一个非常精确的隐私

声明恕我直言。数百万个数据集被处理以推断一个位置的一些可能的ip'范围,在这种情况下,whois信息

可以用来阻止哪个ISP''持有一定的范围。那是'b $ b'更多的''边界'' - 确定一个范围,然后确定

范围的实际价值。由于他们的代理网络,AOL肯定很难确定。


这是相当多的工作,而且非常昂贵。


在这个帖子的旁注中,警告所有人试图使用

地理定位来确定语言:不要使用语言接受标题。

地理定位提供''本地''信息可能很有用,或者

确定(客户群)客户的一般位置。

-

Rik Wasmus


Does anyone have a favored way of finding the geographic location
of a user''s IP address, so that a php script can include content
relevant to that location?

Reverse-lookup of the hostname isn''t reliable and often doesn''t
work, especially if the returned hostname ends with .com, .net,
..info, .biz or other tld that doesn''t reveal geographic location.

I also see a bunch of commercial services that offer a "country
whois" function for a subscription fee. You''d think this sort of
capability would be standardized by now.

Is anybody doing this? If so, how?

-A

解决方案

On Thu, 16 Aug 2007 20:48:58 +0200, axlq <ax**@spamcop.netwrote:

Does anyone have a favored way of finding the geographic location
of a user''s IP address, so that a php script can include content
relevant to that location?

Reverse-lookup of the hostname isn''t reliable and often doesn''t
work, especially if the returned hostname ends with .com, .net,
.info, .biz or other tld that doesn''t reveal geographic location.

I also see a bunch of commercial services that offer a "country
whois" function for a subscription fee. You''d think this sort of
capability would be standardized by now.

Hardly. Giving out IP''s has little to do with location. It''s pretty hard
work keeping it up to date. There''s hardly any chance of something really
reliable, and certainly not for free.

Is anybody doing this? If so, how?

By using a database updated by a third party, with information more or
less accurate most of the time:
<http://www.maxmind.com/app/geolitecity>
--
Rik Wasmus


On Aug 16, 11:48 am, a...@spamcop.net (axlq) wrote:

>
Does anyone have a favored way of finding the geographic location
of a user''s IP address, so that a php script can include content
relevant to that location?

Nope. IP addresses often lie. AOL users in the U.S. all appear to
come from Virginia. AOL users in Germany are often seen as coming
from the UK. Users on corporate networks are usually seen as located
at the corporation''s headquarters or even the corporation''s telco''s
headquarters.

I also see a bunch of commercial services that offer a "country
whois" function for a subscription fee. You''d think this sort of
capability would be standardized by now.

It is. Matching IP addresses with locations is done based on WHOIS
information. But to get and keep current WHOIS for the entire
Internet, you need to be a domain registrar or good friends with
one. :) Plus, WHOIS reflects who owns the IP address, not who uses
it...

Cheers,
NC


On Fri, 17 Aug 2007 00:02:59 +0200, NC <nc@iname.comwrote:

>I also see a bunch of commercial services that offer a "country
whois" function for a subscription fee. You''d think this sort of
capability would be standardized by now.


It is. Matching IP addresses with locations is done based on WHOIS
information.

They might use them, however, mathing IP-adresses to country (state, city)
is not entirely done by WHOIS information. It is often a fallback if
nothing else is known/certain. A lot of the more reliable sources
continuously hold massive ''surveys'' (do you live here? if not, please tell
us where you do...), and get information from third parties where an
IP-address and geolocation are given (some ISP''s and larger online stores
for example, allthough they would have to have a very precise privacy
statement IMHO). Millions of datasets get processed to extrapolate some
probable range of ip''s for a location, in which case the whois information
comes in handy for determening which ISP''s hold certain ranges. That''s
more of a ''boundary''-determining of a range then the actual ''value'' of a
range. AOL is certainly hard to pin down due to their proxy network.

It''s all quite a lot of work, and terribly expensive.

And on a sidenote in this thread a warning to all trying to use
geolocation to determine language: don''t, use the language-accept headers.
Geolocation might be usefull to provide ''local'' information or to
determine the general location of (groups of) clients.
--
Rik Wasmus


这篇关于查找IP地址的地理位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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