根据号码查归属地

 根据百度api获取号码的归属地
 $mobile = "173*****123";
 $json = file_get_contents('http://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?    resource_id=6004&ie=utf8&oe=utf8&query='.$mobile);
    $arr = json_decode($json,true);
    echo "<pre>";
    echo $arr;
    echo "</pre>";

返回值:
array:4 [
“status” => “0”
“t” => “”
“set_cache_time” => “”
“data” => array:1 [
0 => array:30 [
“StdStg” => 6054
“StdStl” => 8
“_update_time” => “1572265674”
“cambrian_appid” => “0”
“city” => “郑州”
“key” => “173”
“prov” => “河南”
“showurl” => “https://anquan.baidu.com/page/41”
“title” => “XXX”
“type” => “中国电信”
“url” => “https://anquan.baidu.com/page/41”
“loc” => “http://open.baidu.com/q?r=2012696&k=173”
“SiteId” => 2006296
“_version” => 29874
“_select_time” => 1572265674
“querytype” => “手机号码”
“phoneinfo” => “手机号码"173123""
“phoneno” => "173
123”
“origphoneno” => “173123"
“titlecont” => “手机号码归属地查询”
“showlamp” => “1”
“clickneed” => “0”
“ExtendedLocation” => “”
“OriginQuery” => "173
123”
“tplt” => “mobilephone”
“resourceid” => “6054”
“fetchkey” => “6054_173”
“appinfo” => “”
“role_id” => 1
“disp_type” => 0
]
]
]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值