新浪通过IP地址获取当前地理位置(ip端、国家、省份、城市、运营商)的php接口

Share on:

新浪通过IP地址获取当前地理位置(ip端、国家、省份、城市、运营商)的php接口很强大呢

返回的方式多种多样

默认为html,format参数可以为json、js。

http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=json

{"ret":1,"start":"222.76.250.147","end":"222.76.255.255","country":"\u4e2d\u56fd","province":"\u798f\u5efa","city":"\u53a6\u95e8","district":"","isp":"\u7535\u4fe1","type":"","desc":""}

http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js

var remote_ip_info = {"ret":1,"start":"222.76.250.147","end":"222.76.255.255","country":"\u4e2d\u56fd","province":"\u798f\u5efa","city":"\u53a6\u95e8","district":"","isp":"\u7535\u4fe1","type":"","desc":""};
闽ICP备12003472号-7