有道手机归属地、邮政编码查询等API 实例
来源:互联网 发布:ps linux命令 编辑:程序博客网 时间:2024/04/27 16:45
这几个接口都是以URL GET方式提交参数,以XML的形式返回查询结果
查询IP地址:
http://www.youdao.com/smartresult-xml/search.s?type=ip&q=IP地址
举例:http://www.youdao.com/smartresul ... amp;q=123.233.157.9
返回:
<?xml version="1.0" encoding="gbk"?>
<smartresult>
<product type="ip">
<ip>123.233.157.9</ip>
<location>山东省济南市 网通</location>
</product>
</smartresult>
查询手机号码归属地:
http://www.yodao.com/smartresult-xml/search.s?type=mobile&q=手机号
举例:http://www.yodao.com/smartresult ... e&q=13892101111
返回:
<?xml version="1.0" encoding="gbk"?>
<smartresult>
<product type="mobile">
<phonenum>13892101111</phonenum>
<location>陕西 延安</location>
</product>
</smartresult>
查询身份证信息:
http://www.yodao.com/smartresult-xml/search.s?type=id&q=身份证号码
举例:http://www.youdao.com/smartresul ... =370782196402121133
返回:
<?xml version="1.0" encoding="gbk"?>
<smartresult>
<product type="identitycard">
<code>370782196402121133</code>
<location>山东省潍坊市诸城市</location>
<birthday>19640212</birthday>
<gender>m</gender>
</product>
</smartresult>
邮编、区号、城市名查询城市信息:
http://www.yodao.com/smartresult-xml/search.s?type=zip&q=邮编或区号或城市名
举例:http://www.youdao.com/smartresult-xml/search.s?type=zip&q=武汉
注:此时从输入框获取城市名需要:java.net.URLEncoder.encode(cityName,"UTF-8");当为汉字的时候不处理直接访问会得不到数据。
返回:
<?xml version="1.0" encoding="gbk"?>
<smartresult>
<product type="zipcode">
<province>湖北省</province>
<city>武汉市</city>
<location>湖北省 武汉市</location>
<phone>027</phone>
<zipcode>430000</zipcode>
</product>
</smartresult>
举例:http://www.youdao.com/smartresult-xml/search.s?type=zip&q=021
返回:
<?xml version="1.0" encoding="gbk"?>
<smartresult>
<product type="zipcode">
<province></province>
<city>上海市</city>
<location>上海市</location>
<phone>021</phone>
<zipcode>200000</zipcode>
</product>
</smartresult>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
区号查询城市: <script>
function updateCall(var1, var2, var3){
$("#info").html(var2.location);
}
function showInfo(zip){
$.getScript("http://www.youdao.com/smartresult-xml/search.s?&jsFlag=true&type=zip&q=" + zip);
}
</script>
<input name="n" type="text" id="txt">
<input type="button" value="查询" onclick="showInfo(txt.value)">
<div id="info"/></div>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
查询IP归属地: <script>
function updateCall(var1, var2, var3){
$("#info2").html(var2.location);
}
function showInfo2(zip){
$.getScript("http://www.youdao.com/smartresult-xml/search.s?&jsFlag=true&type=ip&q=" + zip);
}
</script>
<input name="n" type="text" id="txt2">
<input type="button" value="查询" onclick="showInfo2(txt2.value)">
<div id="info2"/></div>
- 有道手机归属地、邮政编码查询等API 实例
- 查询手机归属地API
- 网易有道IP,身份证号, 手机号归属地API查询接口
- 网易有道IP, 手机号, 身份证号归属地查询API接口
- 手机归属地查询
- 手机归属地查询
- 查询手机归属地
- 手机归属地查询
- 手机归属地查询
- 用PHP实现手机归属地查询api接口
- 实用Ip、手机、身份证归属地查询API
- 用PHP实现手机归属地查询api接口
- 手机归属地免费查询接口,api,wsdl,webservice
- PHP实现手机归属地查询API接口
- 手机归属地查询示例
- 集成手机归属地查询
- php手机归属地查询
- java 手机归属地查询
- solaris下sed脚本替换内容
- js实现文本框输入内容的相加
- 网站内容优化之若何克制重复内容
- HDU 4358 Boring counting (树状数组)
- 字符串转换成日期型
- 有道手机归属地、邮政编码查询等API 实例
- HDU-2015
- 杭电 HDU 1242 Rescue
- Unable to resolve target 'android-7'
- Sizeof与Strlen的区别与联系
- 给大家普及一下网站响应代码
- 新手报道
- ubuntu使用过程中遇到的一些错误,各自摘抄,持续更新ing
- hdu 2768 最大独立集