随笔-204  评论-90  文章-8  trackbacks-0
摘自:http://www.oschina.net/code/snippet_1030827_21294
<?php
/*
新浪的IP查询接口:
新浪的:http://counter.sina.com.cn/ip?ip=IP地址
返回Js数据,感觉不是很精确,可以把问号后面的去掉,直接返回本机对应的IP所在地

有道的IP查询接口:
返回XML数据:http://www.yodao.com/smartresult-xml/search.s?type=ip&q=0.0.0.0
返回JSON数据:http://www.yodao.com/smartresult-xml/search.s?jsFlag=true&type=ip&q=0.0.0.0
把0.0.0.0换成需查询的IP地址即可,这个应该是用纯真的数据库

太平洋电脑网IP查询接口:
http://whois.pconline.com.cn/?ip=0.0.0.0
把0.0.0.0换成IP地址,页面上还有其他无关内容,这些内容是告诉我们哪些接口可以调用、接口调用参数和使用方法等

查询手机号码归属地接口:
返回XML数据:http://www.youdao.com/smartresult-xml/search.s?type=mobile&q=13888880000
返回JSON数据:http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=mobile&q=13888880000

身份证查询接口:
返回XML数据:http://www.youdao.com/smartresult-xml/search.s?type=id&q=身份证号
返回JSON数据:http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=id&q=身份证号
*/
echo file_get_contents("接口网址和参数");
?>
posted on 2013-05-14 12:10 一凡 阅读(806) 评论(1)  编辑  收藏 所属分类: OpenSource

评论:
# re: 一些可以查询IP地理位置、身份证所在地、手机归属地的接口 2014-11-26 10:54 | 水年华

只有注册用户登录后才能发表评论。


网站导航: