原文地址:http://blog.csdn.net/feixiangdexin123087/article/details/9058263
设计蜂巢IP地址查询接口:http://www.hujuntao.com/api/ip/ip.php腾讯IP地址查询接口:http://fw.qq.com/ipaddress新浪IP地址查询接口:http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js搜狐IP地址查询接口:http://pv.sohu.com/cityjson谷歌IP地址查询接口:http://j.maxmind.com/app/geoip.js有道IP地址查询接口:http://www.youdao.com/smartresult-xml/search.s1616 IP地址查询接口:http://w.1616.net/chaxun/iptolocal.php126 http://ip.ws.126.net/ipqueryhao123 http://app.hao123.com/ipquery/getcity.php?rtype=2淘宝 http://ip.taobao.com/service/getIpInfo.php?ip=117.89.35.58太平洋电脑网 http://whois.pconline.com.cn/百度 "http://api.map.baidu.com/location/ip?ak=F454f8a5efe5e577997931cc01de3974&ip="+strIP
API请求地址 : http://www.hujuntao.com/api/ip/ip.PHP?参数
参数说明:
IP : IP地址 可选format : 输出格式 json 可选 默认为JSJSON调用示例: 请求地址:http://www.hujuntao.com/api/ip/ip.php?callback=jQuery17107324279078748077_1327024991339&format=json&_=1327024991363
{ “ip”: “117.89.35.58″, “province”: “\u6c5f\u82cf”, “city”: “\u5357\u4eac” }
该方法已经不可用,访问http://fw.qq.com/ipaddre显示“The page you are looking for is temporarily unavailable. Please try again later.”。腾讯对Referer做了判断,虽然可以通过PHP伪造Referer,但是实际测试中获得的是服务器的IP地址而不是客户端的IP地址。我们一起鄙视一下腾讯。╭∩╮(︶︿︶)╭∩╮
据说是谷歌的,不知道是不是真的。
<script type="text/javascript" src="http://j.maxmind.com/app/geoip.js"></script><script type="text/javascript">// < ![CDATA[// < ![CDATA[console.log(geoip_country_name()+','+geoip_region_name()+','+geoip_city())//China,Jiangsu,Nanjing// ]]></script>调用接口示例:http://www.youdao.com/smartresult-xml/search.s?type=ip&q=123.233.157.9
返回XML数据
<?xml version=”1.0″ encoding=”gbk”?> <smartresult> <product type=”ip”> <ip>123.233.157.9</ip> <location>山东省济南市 网通</location> </product> </smartresult>
或者
http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&keyfrom=163.com&event=fYodaoCallBack&type=ip&q=192.168.1.1
返回JSON数据
fYodaoCallBack(1, {‘product’:'ip’,'ip’:’192.168.1.1′,’location’:'局域网 对方和您在同一内部网’} , ”);API请求地址 : http://www.hujuntao.com/api/ip/ip.php?参数
参数说明:
IP : IP地址 可选format : 输出格式 json 可选 默认为JSJSON调用示例: 请求地址:http://www.hujuntao.com/api/ip/ip.php?callback=jQuery17107324279078748077_1327024991339&format=json&_=1327024991363
{ “ip”: “117.89.35.58″, “province”: “\u6c5f\u82cf”, “city”: “\u5357\u4eac” }
该方法已经不可用,访问http://fw.qq.com/ipaddre显示“The page you are looking for is temporarily unavailable. Please try again later.”。腾讯对Referer做了判断,虽然可以通过PHP伪造Referer,但是实际测试中获得的是服务器的IP地址而不是客户端的IP地址。我们一起鄙视一下腾讯。╭∩╮(︶︿︶)╭∩╮
据说是谷歌的,不知道是不是真的。
<script type="text/javascript" src="http://j.maxmind.com/app/geoip.js"></script><script type="text/javascript">// < ![CDATA[// < ![CDATA[console.log(geoip_country_name()+','+geoip_region_name()+','+geoip_city())//China,Jiangsu,Nanjing// ]]></script>调用接口示例:http://www.youdao.com/smartresult-xml/search.s?type=ip&q=123.233.157.9
返回XML数据
<?xml version=”1.0″ encoding=”gbk”?> <smartresult> <product type=”ip”> <ip>123.233.157.9</ip> <location>山东省济南市 网通</location> </product> </smartresult>
或者
http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&keyfrom=163.com&event=fYodaoCallBack&type=ip&q=192.168.1.1
返回JSON数据
fYodaoCallBack(1, {‘product’:'ip’,'ip’:’192.168.1.1′,’location’:'局域网 对方和您在同一内部网’} , ”);