The free interface is as follows:
Sina's IP address query interface: HTTP://INT.DPOOL.SINA.COM.CN/IPLOOKUP/IPLOOKUP.PHP?FORMAT=JS
Sina Multi-Region test method: http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=218.192.3.42
Sohu IP Address Query interface (default GBK): Http://pv.sohu.com/cityjson
Sohu IP Address Query interface (can be set code): Http://pv.sohu.com/cityjson?ie=utf-8
Sohu additional IP Address query interface: Http://txt.go.sohu.com/ip/soip take Sina as an example, call jquery's Getscript ()
$.getscript (' Http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js ', function () {
$ ("#depcity"). Val ( Getcity (remote_ip_info.city));
Sina's IP Address query interface return value is:
var remote_ip_info = {"ret": 1, "Start":-1, "End":-1, "Country": "\u4e2d\u56fd", "Province": "\U6C5F\U82CF", "City": "\ U5f90\u5dde "," District ":" "," ISP ":" "," type ":" "," desc ":" "};
Baidu Free Interface:
http://api.map.baidu.com/location/ip?ak=F454f8a5efe5e577997931cc01de3974&ip=180.124.234.248
AK: Key
Ip:ip Address
Response results:
{"Address
": "Cn| Jiangsu | none| Chinanet|0|0 ","
content ": {"
Address_detail ": {"
Province ":" Jiangsu Province ",
" City ":" Xuzhou ",
" district ":" " ,
"Street": "",
"Street_number": "",
"City_code": 316
},
"address": "Jiangsu Province Xuzhou",
"point": {
"Y": "4041039.6",
"x": "13045462.3"
}
,
"status": 0
}