Tencent IP address query interface: http://fw.qq.com/ipaddress
Sina IP address query interface: http://int.dpool.sina.com.cn/iplookup/iplookup.php? Format = js
Sohu IP address query interface: http://pv.sohu.com/cityjson
Google IP address query interface: http://j.maxmind.com/app/geoip.js
Youdao IP address query interface: http://www.youdao.com/smartresult-xml/search.s
1616 IP address query interface: http://w.1616.net/chaxun/iptolocal.php
126 http://ip.ws.126.net/ipquery
Hao123 http://app.hao123.com/ipquery/getcity.php? Rtype = 2
Let me take a look at the test Tencent IP address aip
Tencent IP address API address: http://fw.qq.com/ipaddress
The returned data format is:
The code is as follows: |
Copy code |
Var IPData = new Array ("58.218.198.205 & Prime;," "," Jiangsu Province "," Xuzhou City "); |
Use JS code for retrieval:
The code is as follows: |
Copy code |
<Script language = "javascript" type = "text/javascript" src = "http://fw.qq.com/ipaddress"> </script> <Script> document. write ("Your IP address is:" + IPData [0] + ", from:" + IPData [2]); </script> |
The Sina IP address query interface returns
The code is as follows: |
Copy code |
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 ": ""}; |
Sohu IP address query interface
The code is as follows: |
Copy code |
Var returnCitySN = {"cip": "Maid", "cid": "430000", "cname": "Hunan province "}; |
Well, I will not introduce you to other operations.