微信论坛
标题:
微信域名检测API源码,可检测域名能否在微信正常打开
[打印本页]
作者:
首席福利官
时间:
2020-5-21 17:52
标题:
微信域名检测API源码,可检测域名能否在微信正常打开
【免费分享】微信域名检测API源码,可检测域名能否在微信正常打开。这款微信域名检查API源码适合于微信防红防拦截,便于及时更换域名。采用腾讯官方接口,无需第三方,代码简洁纯净。
<?php
/** ----------------------------------
* wx域名检测
* Author: https://bbs.weiwangvip.com/forum-58-1.html
-------------------------------------- **/
header('Content-type: text/json;charset=utf-8');
if(empty($_REQUEST['url'])){
exit('{"code":0,"msg":"参数不正确"}');
}
$api = get_headers('http://mp.weixinbridge.com/mp/wapredirect?url='.$_REQUEST['url']);
if($api[1] !== 'Location: '.$_REQUEST['url'].''){
$value = array('code'=>202,'msg'=>'域名被封');
}else{
$value = array('code'=>200,'msg'=>'域名正常');
}
echo json_encode($value,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
?>
复制代码
欢迎光临 微信论坛 (https://bbs.weiwangvip.com/)
Powered by Discuz! X3.2