接口地址
https://api.vvhan.com/api/phone
返回格式
JSON
请求方式:
GET
请求示例:
https://api.vvhan.com/api/phone?tel=13145211010
参数说明
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
tel | 是 | string | 输入手机号 |
返回数据
{"response":{"13145211010":{"detail":{"area":[{"city":"徐州"}],"province":"江苏","type":"domestic","operator":"联通"},"location":"江苏徐州联通"}},"responseHeader":{"status":200,"time":1551766092985,"version":"1.1.0"}}
调用实例
自行调用
示例代码
<?php
header("Content-Type:text/json;charset=UTF-8"); $num = $_GET['num']; $result = file_get_contents("https://api.vvhan.com/api/phone?tel=" . $num); echo $result;
?>