系统管理

星期二, 01 12月 2020 15:08

防止代理服务器的PHP脚本源代码

Written by 
Rate this item
(0 votes)
   $proxy_headers = array(
           'HTTP_VIA',
           'HTTP_X_FORWARDED_FOR',
           'HTTP_FORWARDED_FOR',
           'HTTP_X_FORWARDED',
           'HTTP_FORWARDED',
           'HTTP_CLIENT_IP',
           'HTTP_FORWARDED_FOR_IP',
           'VIA',
           'X_FORWARDED_FOR',
           'FORWARDED_FOR',
           'X_FORWARDED',
           'FORWARDED',
           'CLIENT_IP',
           'FORWARDED_FOR_IP',
           'HTTP_PROXY_CONNECTION'
       );
       foreach($proxy_headers as $x){
           if (isset($_SERVER[$x])) die("You are using a proxy!");
       }
Read 408 times