/***
* 获取手机号的归属地
* @param $phone //手机号
* @return string
*/
function GetPhoneLocation($phone){
if (empty($phone)) return false;
$url = "/cc/json/mobile_tel_segment.htm?tel={$phone}";
$response = file_get_contents($url);
$list= mb_convert_encoding($response, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5');
$res = trim(explode('=',$list)[1]);
preg_match_all("/(\w+):'([^']+)/", $res, $m);
$res = array_combine($m[1], $m[2]);
if ($res && isset($res['province']) && $res['province'] != "") return res else return "";
}