腾讯的IP地址API接口地址:http://fw.qq.com/ipaddress
新浪的IP地址查询接口:http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js
结果:
var remote_ip_info = {"ret":1,"start":"223.223.192.0","end":"223.223.207.255","country":"u4e2du56fd","province":"u5317u4eac","city":"u5317u4eac","district":"","isp":"","type":"","
新浪多地域测试方法:http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=218.192.3.42
结果:
var remote_ip_info = {"ret":1,"start":"218.192.0.0","end":"218.192.7.255","country":"u4e2du56fd","province":"u5e7fu4e1c","city":"u5e7fu5dde","district":"","isp":"u6559u80b2u7f51","type":"u5b66u6821","desc":"u5e7fu5ddeu5927u5b66u7ebau7ec7u670du88c5u5b66u9662u6559u80b2u7f51"};
搜狐IP地址查询接口(默认GBK):http://pv.sohu.com/cityjson
搜狐IP地址查询接口(可设置编码):http://pv.sohu.com/cityjson?ie=utf-8
06 |
(json格式的)国家 、省(自治区或直辖市)、市(县)、运营商 |
09 |
{ "code" :0, "data" :{ "ip" : "210.75.225.254" , "country" : "u4e2du56fd" , "area" : "u534eu5317" , |
10 |
"region" : "u5317u4eacu5e02" , "city" : "u5317u4eacu5e02" , "county" : "" , "isp" : "u7535u4fe1" , |
11 |
"country_id" : "86" , "area_id" : "100000" , "region_id" : "110000" , "city_id" : "110000" , |
12 |
"county_id" : "-1" , "isp_id" : "100017" }} |
13 |
其中code的值的含义为,0:成功,1:失败。 |