Revision: 32759
Updated Code
at November 6, 2012 08:37 by jprochazka
Updated Code
<?php function getRealIp() { if (!empty($_SERVER['HTTP_CLIENT_IP'])){ $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){ $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else{ $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } ?>
Revision: 32758
Updated Code
at October 2, 2010 01:37 by jprochazka
Updated Code
<?php function getRealIPAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])){ $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){ $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else{ $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } ?>
Revision: 32757
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 2, 2010 01:37 by jprochazka
Initial Code
<?php function getRealIPAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])){ $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){ $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else{ $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } ?>
Initial URL
Initial Description
A more reliable way to obtain a visitor's IP address.
Initial Title
Get a visitor\'s real IP address.
Initial Tags
Initial Language
PHP