该API接口自 2011年 SAE平台上线稳定运行至今,增加了17号段的支持,欢迎各种采集注限制 并发10
详细使用说明
接口地址:http://appyun.sinaapp.com/index.php?app=mobile&controller=index&action=api
请求方法:GET
请求参数:
参数名类型必填参数位置描述默认值
appstring是urlParam模块名称(不变)mobile
controllerstring是urlParam控制器名称index
actionstring是urlParam操作名称api
mobilestring是urlParam手机号码或号段13800138000
outfmtstring是urlParam期望得到的结果类型json
请求示例:
http://appyun.sinaapp.com/index.php?app=mobile&controller=index&action=api&outfmt=json&mobile=13800138000
JSON返回示例:
?
1
2
3
4
5
6
7
8
9
10
|
{
"id" : "80012" ,
"Mobile" : "13800138000" ,
"Province" : "\\u5317\\u4eac" ,
"City" : "\\u5317\\u4eac" ,
"AreaCode" : "010" ,
"PostCode" : "100000" ,
"Operators" : "\\u4e2d\\u56fd\\u79fb\\u52a8" ,
"Card" : "GSM"
}
|
XML返回示例:
?
1
2
3
4
5
6
7
8
9
10
11
|
<? xml version = "1.0" encoding = "utf-8" ?>
< QueryResponse xmlns = "http://appyun.sinaapp.com/" >
< Mobile >13800138000</ Mobile >
< QueryResult >True</ QueryResult >
< Province >北京</ Province >
< City >北京</ City >
< AreaCode >010</ AreaCode >
< PostCode >100000</ PostCode >
< Operators >中国移动</ Operators >
< Card >GSM</ Card >
</ QueryResponse >
|
使用方法
?
1
2
3
4
5
6
|
function getMobileInfo( $mobile )
{
$response = file_get_contents ( 'http://appyun.sinaapp.com/index.php?app=mobile&controller=index&action=api&outfmt=json&mobile=' . $mobile )
$result = json_decode( $response ,true);
return $result ;
}
|
以上所述就是本文的全部内容了,希望大家能够喜欢。
相关文章
猜你喜欢
- 个人服务器网站搭建:如何选择适合自己的建站程序或框架? 2025-06-10
- 64M VPS建站:能否支持高流量网站运行? 2025-06-10
- 64M VPS建站:怎样选择合适的域名和SSL证书? 2025-06-10
- 64M VPS建站:怎样优化以提高网站加载速度? 2025-06-10
- 64M VPS建站:是否适合初学者操作和管理? 2025-06-10
TA的动态
- 2025-07-10 怎样使用阿里云的安全工具进行服务器漏洞扫描和修复?
- 2025-07-10 怎样使用命令行工具优化Linux云服务器的Ping性能?
- 2025-07-10 怎样使用Xshell连接华为云服务器,实现高效远程管理?
- 2025-07-10 怎样利用云服务器D盘搭建稳定、高效的网站托管环境?
- 2025-07-10 怎样使用阿里云的安全组功能来增强服务器防火墙的安全性?
快网idc优惠网
QQ交流群
您的支持,是我们最大的动力!
热门文章
-
2025-05-25 60
-
2025-05-25 46
-
2025-05-25 84
-
2025-05-24 47
-
asp.net core利用AccessControlHelper实现控制访问权限
2025-05-29 57
热门评论