Skip to main content
Active reading.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

Like that???the following?

if (($ip=filter_input(INPUT_SERVER, 'REMOTE_ADDR', validate_ip))===false === false or empty($ip)) { exit;  exit; } echo $ip; 

PS

if (($ip=filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP|FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE))===false === false) {   header('HTTP/1.0 400 Bad Request');   exit; } 

All headers beginning with 'HTTP_' or 'X-' may be spoofspoofed, respectively is user defined. If you want to keep track, use cooiescookies, etc.

Like that????

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',validate_ip))===false or empty($ip)){ exit;  } echo $ip; 

PS

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',FILTER_VALIDATE_IP|FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE))===false){ header('HTTP/1.0 400 Bad Request'); exit; } 

All headers beginning with 'HTTP_' or 'X-' may be spoof respectively is user defined. If you want to keep track use cooies etc.

Like the following?

if (($ip=filter_input(INPUT_SERVER, 'REMOTE_ADDR', validate_ip)) === false or empty($ip)) { exit; } echo $ip; 

PS

if (($ip=filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP|FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE)) === false) {   header('HTTP/1.0 400 Bad Request');   exit; } 

All headers beginning with 'HTTP_' or 'X-' may be spoofed, respectively is user defined. If you want to keep track, use cookies, etc.

added 131 characters in body
Source Link
B.F.
  • 477
  • 6
  • 9

Like that????

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',validate_ip))===false or empty($ip)){ exit; } echo $ip; 

PS

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',FILTER_VALIDATE_IP|FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE))===false){ header('HTTP/1.0 400 Bad Request'); exit; } 

All headers beginning with 'HTTP_' or 'X-' may be spoof respectively is user defined. If you want to keep track use cooies etc.

Like that????

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',validate_ip))===false or empty($ip)){ exit; } echo $ip; 

PS

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',FILTER_VALIDATE_IP|FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE))===false){ header('HTTP/1.0 400 Bad Request'); exit; } 

Like that????

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',validate_ip))===false or empty($ip)){ exit; } echo $ip; 

PS

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',FILTER_VALIDATE_IP|FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE))===false){ header('HTTP/1.0 400 Bad Request'); exit; } 

All headers beginning with 'HTTP_' or 'X-' may be spoof respectively is user defined. If you want to keep track use cooies etc.

added 220 characters in body
Source Link
B.F.
  • 477
  • 6
  • 9

Like that????

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',validate_ip))===false or empty($ip)){ exit; } echo $ip; 

PS

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',FILTER_VALIDATE_IP|FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE))===false){ header('HTTP/1.0 400 Bad Request'); exit; } 

Like that????

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',validate_ip))===false or empty($ip)){ exit; } echo $ip; 

Like that????

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',validate_ip))===false or empty($ip)){ exit; } echo $ip; 

PS

if(($ip=filter_input(INPUT_SERVER,'REMOTE_ADDR',FILTER_VALIDATE_IP|FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE))===false){ header('HTTP/1.0 400 Bad Request'); exit; } 
Source Link
B.F.
  • 477
  • 6
  • 9
Loading