if ($_SERVER["HTTP_X_FORWARDED_FOR"]) { $_SERVER["REMOTE_ADDR"] = preg_replace('/.*,\s*/','', $_SERVER["HTTP_X_FORWARDED_FOR"]); } ?>