首页 / 话题 / 站长 / 文章详情

免费微信域名拦截检测API接口

一直在的 2023-03-02 | 阅读(613) | 评论(0

接口地址:https://www.wodname.com/api/wx_check

请求类型:get|post

返回格式:json

请求示例:https://www.wodname.com/api/wx_check?domain=wodname.com

请求参数说明:

名称 必填 类型 说明
domain string 需要查询的域名,无需http

返回参数说明:

名称 类型 说明
code int 状态码:1正常|0已拦截|2非官方网页|3浏览器访问
msg string 成功或失败的消息

返回示例:


{
    "code":1,
    "msg":"正常"
}

PHP示例代码:


header("Content-Type:text/html;charset=UTF-8");

date_default_timezone_set("PRC");

$stream_opts = [
    "ssl" => [
    "verify_peer"=>false,
    "verify_peer_name"=>false,
]
];
$url = "wodname.com";
$result = file_get_contents("https://www.wodname.com/api/wx_check?domain=".$url,false,
stream_context_create($stream_opts));

$arr=json_decode($result,true);

if($arr['code'] == 1){
    echo $arr['msg'];
}else{
    echo '自由发挥';
}

接口使用说明:

此接口只支持在WodName(https://www.wodname.com)购买的域名使用,使用此接口可以做到域名被微信拦截后自动更换域名的效果,建议调用频率:5分钟或者大于5分钟一次

评论(0)
请登录
请登录后发表评论