ip地址api第三方jsonp接口整理
腾讯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": "湖南省"}; |
好了其它的我就不介绍了大家自行操作吧。
分享到: