腾讯与新浪的通过IP地址获取当前地理位置(省份)的接口
腾讯的接口是 ,返回数组 http://fw.qq.com/ipaddress
返回值 var IPData = new Array("61.135.152.194","","北京市","");
新浪的接口 : http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js 多地域测试方法:http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=218.192.3.42
返回值 var remote_ip_info = {"ret":1,"start":"218.192.0.0","end":"218.192.7.255","country":"\u4e2d\u56fd","province":"\u5e7f\u4e1c","city":"\u5e7f\u5dde","district":"","isp":"\u6559\u80b2\u7f51","type":"\u5b66\u6821","desc":"\u5e7f\u5dde\u5927\u5b66\u7eba\u7ec7\u670d\u88c5\u5b66\u9662"};
通过jquery 获取相应的数据
返回值 var IPData = new Array("61.135.152.194","","北京市","");
新浪的接口 : http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js 多地域测试方法:http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=218.192.3.42
返回值 var remote_ip_info = {"ret":1,"start":"218.192.0.0","end":"218.192.7.255","country":"\u4e2d\u56fd","province":"\u5e7f\u4e1c","city":"\u5e7f\u5dde","district":"","isp":"\u6559\u80b2\u7f51","type":"\u5b66\u6821","desc":"\u5e7f\u5dde\u5927\u5b66\u7eba\u7ec7\u670d\u88c5\u5b66\u9662"};
通过jquery 获取相应的数据
代码如下:
$.getScript('数据接口',function(){ //腾讯:IPData[0] //新浪:remote_ip_info.country ... })
相关推荐
腾讯业务组 2020-11-13
umengren 2020-11-11
郑贺腾讯社交广告 2020-11-06
腾讯soso团队 2020-11-06
arcsinz 2020-11-05
sasac 2020-09-25
虫虫 2020-09-11
cloudking000 2020-09-11
fylong 2020-09-11
gxq 2020-09-10
zandy0 2020-09-10
卫士通安全手机 2020-09-10
贵州腾讯社交广告 2020-09-10
DMKJYXGS 2020-08-04
tengxycloud 2020-07-31
fylong 2020-06-28
mingyan 2020-05-26
dynalidan 2020-05-22
ruanjiankaifa00 2020-05-05