note 23018 deleted from function.getenv by philip

From: Date: Mon, 09 Jun 2003 21:02:23 +0000
Subject: note 23018 deleted from function.getenv by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-50057@lists.php.net to get a copy of this message
Note Submitter: dima_@dmitry.ru ---- To get REAL ip, u can also use this: if(getenv("HTTP_CLIENT_IP")) { $ip = getenv("HTTP_CLIENT_IP"); } elseif(getenv("HTTP_X_FORWARDED_FOR")) { $ip = getenv("HTTP_X_FORWARDED_FOR"); } else { $ip = getenv("REMOTE_ADDR"); } Thus, we should have real user IP in variable $ip.

« previous php.notes (#50057) next »