Fwd: php-windows Digest 12 Feb 2002 08:39:27 -0000 Issue 997

From: Date: Tue, 12 Feb 2002 11:04:22 +0000
Subject: Fwd: php-windows Digest 12 Feb 2002 08:39:27 -0000 Issue 997
Groups: php.windows 
Request: Send a blank email to php-windows+get-12020@lists.php.net to get a copy of this message
Use this : $comes_from=array(HTTP_VIA , HTTP_X_COMING_FROM , HTTP_X_FORWARDED_FOR , HTTP_X_FORWARDED , HTTP_COMING_FROM , HTTP_FORWARDED_FOR , HTTP_FORWARDED); // This array *should* hold most of the possible headers identifying the remote IP address. // Credit to Marc.Meurrens@ACM.org for this list. foreach ($comes_from as $value) { if (ereg("^([0-9]{1,3}\.){3,3}[0-9]{1,3}",$$value,$remote_temp)) { $remote=$remote_temp[0]; // Fish out IP match if ereg returns a value }} if (! $remote) { $remote=$REMOTE_ADDR; } Regs, Neil Smith.
-----Original Message----- From: Tal-ee Roberts [mailto:troberts@binghamton.edu] Sent: 11 February 2002 15:42 To: php-windows@lists.php.net Subject: [PHP-WIN] IP address reference Is there any way to get the user's ip address using PHP? thanks -Tal-ee


« previous php.windows (#12020) next »