微信域名拦截检测-api调用例子

微信域名拦截检测-api使用例子
<?php
set_time_limit(0);
$data =[
    'www.baidu.com',
    'chunsing.com',
    'sss.chunsing.com',
    'qq.com',
];
$api ='http://www.yumingjiance.net/index.php?s=/weixin/authapi&apikey=&url=';
foreach ($data as  $url) {
    $res =json_decode(wxcheck($api,$url),1);
    if($res['status']=='0'){
        //拦截域名
        $stop[] = $url;
        echo $url .'->拦截<br>';
    }else{
        // 正常域名
        $ok[] =$url;
        echo $url .'->正常<br>';
    }
sleep(1);
}

function wxcheck($url,$data){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url.$data);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}