Home >Web Front-end >JS Tutorial >Tencent and Sina's interface for obtaining the current geographical location (province) through IP address_jquery
Tencent's interface is to return an array http://fw.qq.com/ipaddress
Return value var IPData = new Array("61.135.152.194","","Beijing City","");
Sina's interface: http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js Multi-region testing method: http://int.dpool.sina.com.cn/iplookup/iplookup. php?format=js&ip=218.192.3.42
Return value var remote_ip_info = {"ret":1,"start":"218.192.0.0","end":"218.192.7.255","country":"u4e2du56fd ","province":"u5e7fu4e1c","city":"u5e7fu5dde","district":"","isp":"u6559u80b2u7f51","type":"u5b66u6821","desc":"u5e7fu5ddeu5927u5b66u7ebau7ec7u670du88c5u 5b66u9662"};
Get the corresponding data through jquery