php-general | 2001062
Date: 06/27/01
- Next message: teo <email protected>: "Re: [PHP] MIME type"
- Previous message: CertifiChecks: "[PHP] HOW TO: Reload a frame with a different URL?"
- In reply to: Colin May: "Re: [PHP] $REMOTE_ADDR error"
- Next in thread: Christian Dechery: "Re: [PHP] $REMOTE_ADDR error"
- Reply: Christian Dechery: "Re: [PHP] $REMOTE_ADDR error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Have a look in phpinfo. You'll find the desired value there.
The reason is indeed proxying.
or try something like this :
if ($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"] != "")
$ip = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"];
$proxy = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$host = <email protected>($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]);
}
else
$ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$host = <email protected>($HTTP_SERVER_VARS["REMOTE_ADDR"]);
}
Brave Cobra
----- Original Message -----
From: "Colin May" <rael <email protected>>
To: "Christian Dechery" <lemming <email protected>>
Cc: <php-general <email protected>>
Sent: Wednesday, June 27, 2001 10:42 AM
Subject: Re: [PHP] $REMOTE_ADDR error
> Almost as if the request was proxied or redirected from the local machine
> (127.0.0.1 is the local loop back ip)
>
> Quoting Christian Dechery (Tue, Jun 26, 2001 at 10:31:54PM -0300)
> > why do $REMOTE_ADDR always returns 127.0.0.1 no matter the user's IP who
is
> > seeing the page?
> >
> > this doesn't look 'remote' to me...
> > ____________________________
> > . Christian Dechery (lemming)
> > . http://www.tanamesa.com.br
> > . Gaita-L Owner / Web Developer
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> > For additional commands, e-mail: php-general-help <email protected>
> > To contact the list administrators, e-mail: php-list-admin <email protected>
> >
>
> --
>
> Colin May - mailto:rael <email protected> - http://www.wibble.org.uk
> "I've got a sand storm blowing in my head seeing many colours but
> the only one coming through is red" - Sandstorm, All Change, Cast
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: teo <email protected>: "Re: [PHP] MIME type"
- Previous message: CertifiChecks: "[PHP] HOW TO: Reload a frame with a different URL?"
- In reply to: Colin May: "Re: [PHP] $REMOTE_ADDR error"
- Next in thread: Christian Dechery: "Re: [PHP] $REMOTE_ADDR error"
- Reply: Christian Dechery: "Re: [PHP] $REMOTE_ADDR error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

