騰訊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
下面我看一下測試騰訊IP地址aip
騰訊的IP地址API接口地址:http://fw.qq.com/ipaddress,返回的是數據格式為:
var IPData = new Array(“58.218.198.205″,”",”江蘇省”,”徐州市”);
使用JS代碼進行調取,代碼如下:
- <script language="javascript" type="text/javascript" src="http://fw.qq.com/ipaddress"></script>
- <script>document.write("你的IP是:"+IPData[0]+",來自:"+IPData[2]);</script>
新浪IP地址查詢接口返回的為,代碼如下:
- var remote_ip_info = {"ret":1,"start":"123.68.0.0","end":"123.68.195.255","country":"u4e2du56fd","province":"u6e56u5357","city":"u957fu6c99","district":"","isp":"u94c1u901a","type":"","desc":""};
搜狐IP地址查詢接口,代碼如下:
- var returnCitySN = {"cip": "123.68.122.147", "cid": "430000", "cname": "湖南省"};
好了其它的我就不介紹了大家自行操作吧.
新聞熱點
疑難解答