推荐:《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("请勿使用代理服务器访问, 谢谢");}
or
php禁止代理访问
<?phpif(empty($_server['http_via']) and empty($_server['http_x_forwarded_for']) and empty($_server['http_xroxy_connection']) and empty($_server['http_pragma']) ){// 没有使用代理}else{exit('<meta charset="utf-8" />禁止使用代理访问');}
以上就是php如何禁止代理访问的详细内容。
