Re: Client IP
| From: | Matthew Sims | Date: | Wed, 07 Jul 2004 23:03:29 +0000 |
| Subject: | Re: Client IP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189914@lists.php.net to get a copy of this message | ||
> Hi,
> How can I get remote IP adress of client?
> I use the fillow script::
>
> $ip=getenv('HTTP_X_FORWARDED_FOR');
> if (!$ip)
> {
> $ip = getenv('REMOTE_ADDR');
> }
>
>
> But sometime it return me "unknown" sa IP adress.
>
> Can someone help me ?
>
> Thanks in advance!
$_SERVER["REMOTE_ADDR"]
--Matthew Sims
--<http://killermookie.org>