美文网首页
[微信域名检测]基于微信域名检测api的PHP随机跳转

[微信域名检测]基于微信域名检测api的PHP随机跳转

作者: 阿乐LeoChen | 来源:发表于2019-03-21 16:13 被阅读0次

    用户名和KEY请到www.xxweixin.com获取

    <?php
    $url = "https://api.weixin139.com/weixin/domain/auto_check_list?user=xxx&key=xxx&type=1";
    $con = get_msg($url);
    $data = json_decode($con,true);
    $count = count($data)-1;
    $rand = rand(0,$count);
    echo $data[$rand]['domain'];
    function get_msg($url){
    $ch = curl_init();
    curl_setopt($ch,CURLOPT_TIMEOUT,1); curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false); curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,false);
    $data = curl_exec($ch);
     if($data){
     curl_close($ch);
     return $data;
     }else {
     $error = curl_errno($ch); curl_close($ch); return false;
    }
    }

    相关文章

      网友评论

          本文标题:[微信域名检测]基于微信域名检测api的PHP随机跳转

          本文链接:https://www.haomeiwen.com/subject/tdkcvqtx.html