域名解析域名防封

439 人参与 | 时间:2019年12月08日 23:01:01
  $domain_zhu = include( UPLOAD_PATH . '/url/url.php');
        $url = 'http://' . $domain_zhu . url('login/register', array('pid' => $this->user_id));

跳转域名处理
$domain_zhu = include UPLOAD_PATH . '/url/url.php';
        if (strpos($domain_zhu, $_SERVER['HTTP_HOST']) !== false) {
            $domain_txt = file_get_contents(UPLOAD_PATH . '/url/domain.txt');
            $domain_arr = explode("\r\n", $domain_txt);
            $domain_arr = array_filter($domain_arr);
            $key = $id % count($domain_arr);
            $domain = trim($domain_arr[$key]);
            $url = 'http://' . $domain . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
            header('Location: '.$url);
            exit();
        }
.