本文主要和大家分享PHP之cURL实现手机号码归属地查询功能,希望能帮助到大家。
1、代码如下:
index.html
query_phone.php
load($contents); $arrMsg = array(); foreach($html->find('table tbody tr td') as $m) { array_push($arrMsg,$m->plaintext); } return $arrMsg; } $ph=$_GET["phone"]; var_dump(simple($ph)); ?>
simple_html_dom.php
需要下载php解析html类库:simple_html_dom.php
2、效果截图
相关推荐:
PHP手机号码归属地查询代码(API接口/mysql)_PHP教程
The above is the detailed content of PHP's cURL implements mobile phone number location query function. For more information, please follow other related articles on the PHP Chinese website!