接口地址:https://api.uouin.com/index.php/index/Jiance/add
返回格式:Json
请求方式:Http/Https Get请求
请求示例:https://api.uouin.com/index.php/index/Jiance/add?username=用户名&key=密钥&type=zt&url=http://www.qq.com
接口说明:HTTP状态检测可实时检测网站运行状态并返回状态解释说明
请求参数说明:
参数名称 | 必填 | 类型 | 说明 |
---|---|---|---|
username | 是 | string | 用户名 |
key | 是 | string | 账户密钥! |
type | 是 | string | 默认为zt |
url | 是 | string | 你要检测的地址! |
返回参数说明:
参数名称 | 类型 | 说明 |
---|---|---|
code | string | 系统返回状态码 |
httpcode | string | 检测的状态码! |
location | string | 重定向后地址! |
msg | string | HTTP状态码介绍 |
url | 地址 | 检测的地址! |
响应文本:
{
"httpcode": 302,
"location": "https:\/\/www.qq.com?fromdefault",
"msg": "临时重定向",
"url": "http:\/\/qq.com",
}
系统状态码参考:
状态码code | 说明 | |
---|---|---|
-200 | 用户名不能空! | |
-201 | key不能空! | |
-202 | url不能为空! | |
-203 | 特殊接口次数用尽! | |
-204 | 访问接口频率超过限制! | |
-205 | 未输入type类型或type错误! | |
-206 | 账户VIP接口服务已过期! | |
-207 | 用户名或key不对! | |
-208 | 非白名单IP禁止调用! | |
-209 | 账户违规被封禁! | |
-210 | 接口异常,查询失败! | |
-211 | 请登陆账户绑定手机号后再调用短网址接口! | |
1001 | 检测类接口域名正常访问! | |
1002 | 检测类接口域名已被封禁! | |
1 | 短网址类调用生成成功! |
对接代码演示:
//$url为要缩短的长链接
$arr = file_get_contents("https://api.uouin.com/index.php/index/Jiance/add?username=用户名&key=密钥&type=10086&url=".urlencode($url));
$json = json_decode($arr,true);
$statu = $json[statu];
echo $statu;//$statu为状态码