骚扰电话查询
查询电话是否被标记骚扰电话

接口地址: https://myapi.2su.cc/api/saoraodianhuachaxun-oick

返回格式: JSON

请求方式: GET

请求示例: https://myapi.2su.cc/api/saoraodianhuachaxun-oick?apiKey=用户中心apiKey&phone=13888888888

请求参数说明:

名称 必填 类型 说明
phone string 电话号

返回参数说明:

名称 类型 说明
code int 状态码
msg string 信息
data object 返回结果集
data => info object 号码信息
data => info => province string 省份
data => info => city string 城市
data => info => operator string 运营商
data => result object 查询标记结果
data => result => {int} => name string 平台
data => result => {int} => msg string 结果

返回示例:

{
	"code": 200,
	"msg": "获取成功",
	"data": {
		"info": {
			"province": "广东",
			"city": "广州",
			"operator": "中国移动"
		},
		"result": [
			{
				"name": "360手机卫士",
				"msg": "正常号码"
			},
			{
				"name": "搜狗号码通",
				"msg": "正常号码"
			},
			{
				"name": "百度手机卫士",
				"msg": "正常号码"
			}
		]
	}
}

请求参数设置:

参数名称 参数值


{
	"code": 200,
	"msg": "获取成功",
	"data": {
		"info": {
			"province": "广东",
			"city": "广州",
			"operator": "中国移动"
		},
		"result": [
			{
				"name": "360手机卫士",
				"msg": "正常号码"
			},
			{
				"name": "搜狗号码通",
				"msg": "正常号码"
			},
			{
				"name": "百度手机卫士",
				"msg": "正常号码"
			}
		]
	}
}

错误码格式说明:

名称 类型 说明
code int 错误码:-1/-2

代码示例:

<?php
// 设置phone参数
$phone = "18888888888";

// 创建一个curl句柄
$ch = curl_init();

// 设置URL和相应的选项
curl_setopt($ch, CURLOPT_URL, "https://myapi.2su.cc/api/saoraodianhuachaxun-oick?apiKey=用户中心apiKey&phone=$phone");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// 执行并获取结果
$result = curl_exec($ch);

// 关闭curl句柄
curl_close($ch);

// 输出结果
echo $result;
?>