http://www.maxmind.com/ 的免费 API 将带您进入国家/地区级别和城市有些IP,如果你付钱给他们,你可以获得更多详细信息,这些信息是很好的默认信息,但不是100%准确。这是我发现的最好的。
http://www.maxmind.com/ 's free API will get you to country level, and city for some IPs, if you pay them you can get some more detail, this information is a good default, but not 100% accurate. It's the best I've found.
I've used IP2Location before and it works great. The free version will only return the country but the pay versions are very accurate and will return alot more information. They have API's for a lot of common languages.
The Geo IP PECL package and Net_GeoIP PEAR package both provide an interface to the maxmind location database (that been mentioned in other answers) for PHP.
发布评论
评论(4)
http://www.maxmind.com/ 的免费 API 将带您进入国家/地区级别和城市有些IP,如果你付钱给他们,你可以获得更多详细信息,这些信息是很好的默认信息,但不是100%准确。这是我发现的最好的。
http://www.maxmind.com/ 's free API will get you to country level, and city for some IPs, if you pay them you can get some more detail, this information is a good default, but not 100% accurate. It's the best I've found.
这是一个完全免费的网络服务
http://www.hostip.info/
Here's a completely free web service
http://www.hostip.info/
我之前使用过IP2Location,效果很好。免费版本只会返回国家/地区,但付费版本非常准确,并且会返回更多信息。他们有很多通用语言的 API。
I've used IP2Location before and it works great. The free version will only return the country but the pay versions are very accurate and will return alot more information. They have API's for a lot of common languages.
Geo IP PECL 包和 Net_GeoIP PEAR 包都为 PHP 提供了 maxmind 位置数据库(在其他答案中提到过)的接口。
The Geo IP PECL package and Net_GeoIP PEAR package both provide an interface to the maxmind location database (that been mentioned in other answers) for PHP.