Home > php教程 > php手册 > body text

ip地址api第三方jsonp接口整理

WBOY
Release: 2016-05-25 16:45:05
Original
1536 people have browsed it

腾讯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
Copy after login
126 http://ip.ws.126.net/ipquery
hao123 http://app.hao123.com/ipquery/getcity.php?rtype=2
Copy after login

下面我看一下测试腾讯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>
Copy after login

新浪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":""};
Copy after login

搜狐IP地址查询接口,代码如下:

var returnCitySN = {"cip": "123.68.122.147", "cid": "430000", "cname": "湖南省"};
Copy after login

好了其它的我就不介绍了大家自行操作吧.


永久链接:

转载随意!带上文章地址吧。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!