note 30326 modified in reserved.variables by jsheets

From: Date: Fri, 14 Mar 2003 14:33:16 +0000
Subject: note 30326 modified in reserved.variables by jsheets
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-45311@lists.php.net to get a copy of this message
[Editor's Note]: This will grab the requesting IP address, this does not always mean the user's IP address, it could be a proxy. ------------- A quick snippet to effectivly and surely grab a users IP address: $userip = ($_SERVER['X_FORWARDED_FOR']) ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; --was-- A quick snippet to effectivly and surely grab a users IP address: $userip = ($_SERVER['X_FORWARDED_FOR']) ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; http://www.php.net/manual/en/reserved.variables.php

« previous php.notes (#45311) next »