function get_mobile_area($mobile){
header('Content-Type:text/html;charset=gbk');
$url = 'http://life.tenpay.com/cgi-bin/mobile/MobileQueryAttribution.cgi?chgmobile='.$mobile;
$content = file_get_contents($url);
return $content;
}
转载于:https://blog.51cto.com/jhomephper/1615678
本文分享了一个使用PHP实现的简单函数,该函数通过向特定URL发送请求来获取输入手机号码的归属地信息。示例代码展示了如何设置HTTP响应头并调用文件获取内容函数来完成这一过程。
1247

被折叠的 条评论
为什么被折叠?



