根据远程ip获取位置
2016-06-15 17:20
351 查看
IP地址查询接口及调用方法
设计蜂巢 | 2011-12-29 | javascript设计蜂巢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.s
1616 IP地址查询接口:http://w.1616.net/chaxun/iptolocal.php
126 http://ip.ws.126.net/ipquery hao123 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/
设计蜂巢接口调用方法
API请求地址 : http://www.hujuntao.com/api/ip/ip. href="http://lib.csdn.net/base/36" target=_blank>PHP?参数参数说明:
IP : IP地址 可选
format : 输出格式 json 可选 默认为JS
JSON调用示例:
请求地址: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”
}
腾讯接口调用方法
<ol class="linenums" style="margin: 0px; padding: 0px 0px 0px 40px; background-color: rgb(243, 243, 243);"><li class="L0" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="tag" style="color: rgb(0, 0, 136);"><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">src</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"http://fw.qq.com/ipaddress"</span><span class="tag" style="color: rgb(0, 0, 136);">></script><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="tag" style="color: rgb(0, 0, 136);">></span><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L1" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L2" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="com" style="color: rgb(136, 0, 0);">//反回格式如下: //var IPData = new Array("117.89.35.98","","江苏省","南京市"); console.log(IPData[0]+','+IPData[2]+','+IPData[3]) //117.89.35.98,江苏省,南京市</span></li><li class="L3" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// ]]></span><span class="tag" style="color: rgb(0, 0, 136);"></script></span></li></ol>
该方法已经不可用,访问http://fw.qq.com/ipaddre显示“The page you are looking for is temporarily unavailable.
Please try again later.”。腾讯对Referer做了判断,虽然可以通过PHP伪造Referer,但是实际测试中获得的是服务器的IP地址而不是客户端的IP地址。我们一起鄙视一下腾讯。╭∩╮(︶︿︶)╭∩╮
新浪接口调用方法
<ol class="linenums" style="margin: 0px; padding: 0px 0px 0px 40px; background-color: rgb(243, 243, 243);"><li class="L0" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="tag" style="color: rgb(0, 0, 136);"><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">src</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"</span><span class="tag" style="color: rgb(0, 0, 136);">></script><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="tag" style="color: rgb(0, 0, 136);">></span><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L1" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L2" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="com" style="color: rgb(136, 0, 0);">//format参数设置返回格式 js/json //ip 要查询IP 可选 //反回格式如下: //var remote_ip_info = {"ret":1,"start":"117.89.35.0","end":"117.89.35.255","country":"\u4e2d\u56fd","province":"\u6c5f\u82cf","city":"\u5357\u4eac","district":"\u767d\u4e0b","isp":"\u7535\u4fe1","type":"","desc":""}; console.log(remote_ip_info["country"]+','+remote_ip_info["province"]+"省"+','+remote_ip_info["city"]+"市")//中国,江苏省,南京市</span></li><li class="L3" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// ]]></span><span class="tag" style="color: rgb(0, 0, 136);"></script></span></li></ol>
搜狐接口调用方法
<ol class="linenums" style="margin: 0px; padding: 0px 0px 0px 40px; background-color: rgb(243, 243, 243);"><li class="L0" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="tag" style="color: rgb(0, 0, 136);"><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">src</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"http://pv.sohu.com/cityjson?ie=utf-8"</span><span class="tag" style="color: rgb(0, 0, 136);">></script><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="tag" style="color: rgb(0, 0, 136);">></span><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L1" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L2" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="com" style="color: rgb(136, 0, 0);">//默认为GBK可通过ie参数设置编码 console.log(returnCitySN["cip"]+','+returnCitySN["cname"])//117.89.35.98,江苏省南京市</span></li><li class="L3" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// ]]></span><span class="tag" style="color: rgb(0, 0, 136);"></script></span></li></ol>
谷歌接口调用方法
据说是谷歌的,不知道是不是真的。<ol class="linenums" style="margin: 0px; padding: 0px 0px 0px 40px; background-color: rgb(243, 243, 243);"><li class="L0" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="tag" style="color: rgb(0, 0, 136);"><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">src</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"http://j.maxmind.com/app/geoip.js"</span><span class="tag" style="color: rgb(0, 0, 136);">></script><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="tag" style="color: rgb(0, 0, 136);">></span><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L1" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L2" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="pln" style="color: rgb(0, 0, 0);">console</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln" style="color: rgb(0, 0, 0);">log</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln" style="color: rgb(0, 0, 0);">geoip_country_name</span><span class="pun" style="color: rgb(102, 102, 0);">()+</span><span class="str" style="color: rgb(0, 136, 0);">','</span><span class="pun" style="color: rgb(102, 102, 0);">+</span><span class="pln" style="color: rgb(0, 0, 0);">geoip_region_name</span><span class="pun" style="color: rgb(102, 102, 0);">()+</span><span class="str" style="color: rgb(0, 136, 0);">','</span><span class="pun" style="color: rgb(102, 102, 0);">+</span><span class="pln" style="color: rgb(0, 0, 0);">geoip_city</span><span class="pun" style="color: rgb(102, 102, 0);">())</span><span class="com" style="color: rgb(136, 0, 0);">//China,Jiangsu,Nanjing</span></li><li class="L3" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// ]]></span><span class="tag" style="color: rgb(0, 0, 136);"></script></span></li></ol>
有道接口调用方法
调用接口示例: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’:'局域网 对方和您在同一内部网’} , ”);
IP地址查询接口及调用方法
设计蜂巢 | 2011-12-29 | javascript设计蜂巢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.s
1616 IP地址查询接口:http://w.1616.net/chaxun/iptolocal.php
126 http://ip.ws.126.net/ipquery hao123 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/
设计蜂巢接口调用方法
API请求地址 : http://www.hujuntao.com/api/ip/ip.php?参数参数说明:
IP : IP地址 可选
format : 输出格式 json 可选 默认为JS
JSON调用示例:
请求地址: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”
}
腾讯接口调用方法
<ol class="linenums" style="margin: 0px; padding: 0px 0px 0px 40px; background-color: rgb(243, 243, 243);"><li class="L0" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="tag" style="color: rgb(0, 0, 136);"><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">src</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"http://fw.qq.com/ipaddress"</span><span class="tag" style="color: rgb(0, 0, 136);">></script><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="tag" style="color: rgb(0, 0, 136);">></span><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L1" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L2" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="com" style="color: rgb(136, 0, 0);">//反回格式如下: //var IPData = new Array("117.89.35.98","","江苏省","南京市"); console.log(IPData[0]+','+IPData[2]+','+IPData[3]) //117.89.35.98,江苏省,南京市</span></li><li class="L3" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// ]]></span><span class="tag" style="color: rgb(0, 0, 136);"></script></span></li></ol>
该方法已经不可用,访问http://fw.qq.com/ipaddre显示“The page you are looking for is temporarily unavailable.
Please try again later.”。腾讯对Referer做了判断,虽然可以通过PHP伪造Referer,但是实际测试中获得的是服务器的IP地址而不是客户端的IP地址。我们一起鄙视一下腾讯。╭∩╮(︶︿︶)╭∩╮
新浪接口调用方法
<ol class="linenums" style="margin: 0px; padding: 0px 0px 0px 40px; background-color: rgb(243, 243, 243);"><li class="L0" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="tag" style="color: rgb(0, 0, 136);"><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">src</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"</span><span class="tag" style="color: rgb(0, 0, 136);">></script><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="tag" style="color: rgb(0, 0, 136);">></span><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L1" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L2" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="com" style="color: rgb(136, 0, 0);">//format参数设置返回格式 js/json //ip 要查询IP 可选 //反回格式如下: //var remote_ip_info = {"ret":1,"start":"117.89.35.0","end":"117.89.35.255","country":"\u4e2d\u56fd","province":"\u6c5f\u82cf","city":"\u5357\u4eac","district":"\u767d\u4e0b","isp":"\u7535\u4fe1","type":"","desc":""}; console.log(remote_ip_info["country"]+','+remote_ip_info["province"]+"省"+','+remote_ip_info["city"]+"市")//中国,江苏省,南京市</span></li><li class="L3" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// ]]></span><span class="tag" style="color: rgb(0, 0, 136);"></script></span></li></ol>
搜狐接口调用方法
<ol class="linenums" style="margin: 0px; padding: 0px 0px 0px 40px; background-color: rgb(243, 243, 243);"><li class="L0" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="tag" style="color: rgb(0, 0, 136);"><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">src</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"http://pv.sohu.com/cityjson?ie=utf-8"</span><span class="tag" style="color: rgb(0, 0, 136);">></script><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="tag" style="color: rgb(0, 0, 136);">></span><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L1" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L2" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="com" style="color: rgb(136, 0, 0);">//默认为GBK可通过ie参数设置编码 console.log(returnCitySN["cip"]+','+returnCitySN["cname"])//117.89.35.98,江苏省南京市</span></li><li class="L3" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// ]]></span><span class="tag" style="color: rgb(0, 0, 136);"></script></span></li></ol>
谷歌接口调用方法
据说是谷歌的,不知道是不是真的。<ol class="linenums" style="margin: 0px; padding: 0px 0px 0px 40px; background-color: rgb(243, 243, 243);"><li class="L0" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="tag" style="color: rgb(0, 0, 136);"><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">src</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"http://j.maxmind.com/app/geoip.js"</span><span class="tag" style="color: rgb(0, 0, 136);">></script><script</span><span class="pln" style="color: rgb(0, 0, 0);"> </span><span class="atn" style="color: rgb(102, 0, 102);">type</span><span class="pun" style="color: rgb(102, 102, 0);">=</span><span class="atv" style="color: rgb(0, 136, 0);">"text/javascript"</span><span class="tag" style="color: rgb(0, 0, 136);">></span><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L1" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// < ![CDATA[</span></li><li class="L2" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(253, 253, 253);"><span class="pln" style="color: rgb(0, 0, 0);">console</span><span class="pun" style="color: rgb(102, 102, 0);">.</span><span class="pln" style="color: rgb(0, 0, 0);">log</span><span class="pun" style="color: rgb(102, 102, 0);">(</span><span class="pln" style="color: rgb(0, 0, 0);">geoip_country_name</span><span class="pun" style="color: rgb(102, 102, 0);">()+</span><span class="str" style="color: rgb(0, 136, 0);">','</span><span class="pun" style="color: rgb(102, 102, 0);">+</span><span class="pln" style="color: rgb(0, 0, 0);">geoip_region_name</span><span class="pun" style="color: rgb(102, 102, 0);">()+</span><span class="str" style="color: rgb(0, 136, 0);">','</span><span class="pun" style="color: rgb(102, 102, 0);">+</span><span class="pln" style="color: rgb(0, 0, 0);">geoip_city</span><span class="pun" style="color: rgb(102, 102, 0);">())</span><span class="com" style="color: rgb(136, 0, 0);">//China,Jiangsu,Nanjing</span></li><li class="L3" style="margin: 0px; padding: 0px; list-style: decimal outside; background-color: rgb(245, 245, 245);"><span class="com" style="color: rgb(136, 0, 0);">// ]]></span><span class="tag" style="color: rgb(0, 0, 136);"></script></span></li></ol>
有道接口调用方法
调用接口示例: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’:'局域网 对方和您在同一内部网’} , ”);
顶1
踩
相关文章推荐
- Akka学习笔记:测试Actors
- Android 缩放图片的几种方式说明
- Redis基础教程第7节 - Set
- android shape的使用
- ubuntu下配置环境变量
- 经典再现 基于JAVA平台开发坦克大战游戏
- 【转】Windows搭建Eclipse+JDK+SDK的Android
- 轻松了解JS中this的指向
- Shell脚本eval、``和$()、[[和[、 $(( ))和(())、${}
- 在windows上部署使用Redis
- DNS 地址大全
- Windows下使用AndroidStudio+ReactNative开发Android应用
- Java编程:并发编程的3个特性
- AndroidStudio获取sha1值
- 成绩排序 qsort&&bsearch
- RXjava解决数据管理问题
- Nginx的nginx.conf配置文件中文注释说明
- 迪克斯特拉算法
- PHP客户端 solr查询具体实现
- [C++ 面试基础知识总结] 关联容器