PHP怎么禁止代理访问

PHP禁止代理访问

if($_SERVER['HTTP_PROXY_CONNECTION'] || $_SERVER['HTTP_VIA'] || $_SERVER['HTTP_USER_AGENT_VIA'] || $_SERVER['HTTP_X_FORWARDED_FOR'] || $_SERVER['HTTP_PROXY_CONNECTION'] || $_SERVER['HTTP_CACHE_CONTROL'] || $_SERVER['HTTP_CACHE_INFO']) {
        die("请勿使用代理服务器访问, 谢谢");
}

发表评论

邮箱地址不会被公开。 必填项已用*标注