相信我,天才无法与我媲美

PHP怎么禁止代理访问

2017-04-13

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("请勿使用代理服务器访问, 谢谢");
}

作者:lrxin | Categories:PHP | Tags:

发表评论