Re: IP Address
| From: | Renze Munnik | Date: | Tue, 07 Aug 2001 13:49:39 +0000 |
| Subject: | Re: IP Address | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61617@lists.php.net to get a copy of this message | ||
On Tue, Aug 07, 2001 at 08:29:34AM -0500, Joseph Bannon wrote:
> Just because you're having a bad day doesn't mean I should. Can you just
> tell me what it is? I don't have those posts.
>
> J
Wow... I believe you're the one having the bad day.
Anyway, here's the result of the thread... It's the code you need.
=====[ Get remote IP ]=====
if(getenv(HTTP_X_FORWARDED_FOR))
{
$ip=getenv(HTTP_X_FORWARDED_FOR);
}
else
{
$ip=getenv(REMOTE_ADDR);
}
$host = gethostbyaddr($ip);
===========================
--
* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: renze@datalink.nl
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM HAARLEM
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««