/**
* 获取手机归属地
* @param $telephone
* @return bool
*/
public static function getPhoneLocation($telephone) {
$urlBt = 'http://tool.bitefu.net/shouji';
$dataBt['mobile'] = $telephone;
$urlJh = 'http://apis.juhe.cn/mobile/get';
$dataJh['phone'] = $telephone;
$dataJh['key'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$dataJh['dtype'] = '';
$return_data = json_decode(Http::newDoGet($urlBt,$dataBt,3),true);
if ((string)$return_data['status'] === '1') {
$out['province'] = $return_data['province'];
$out['city'] = $return_data['city'];
$out['code'] = $return_data['citycode'];
return $out;
} else {
$return_data = json_decode(Http::newDoGet($urlJh,$dataJh,3),true);
if ((string)$return_data['resultcode'] === '200') {
$out['province'] = $return_data['result']['province'];
$out['city'] = $return_data['result']['city'];
$out['code'] = $return_data['result']['areacode'];
return $out;
}
return false;
}
}