Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. <?php
  2.     // Written by Jckf.
  3.     // This checks for proxy headers in the request, and the source
  4.     // port of the connection against common proxy ports.
  5.  
  6.     if (
  7.         array_key_exists('HTTP_X_FORWARDED_FOR',    $_SERVER)   ||
  8.         array_key_exists('HTTP_X_FORWARDED',        $_SERVER)   ||
  9.         array_key_exists('HTTP_FORWARDED_FOR',      $_SERVER)   ||
  10.         array_key_exists('HTTP_CLIENT_IP',          $_SERVER)   ||
  11.         array_key_exists('HTTP_VIA',                $_SERVER)   ||
  12.  
  13.         in_array($_SERVER['REMOTE_PORT'],array(8080,80,6588,8000,3128,553,554))
  14.     ) {
  15.         exit;
  16.     }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement