> 
> =====[ Get remote IP ]=====
> 
> if(getenv(HTTP_X_FORWARDED_FOR))
> {
>   $ip=getenv(HTTP_X_FORWARDED_FOR);
> }
> else
> {
>   $ip=getenv(REMOTE_ADDR);
> }
> $host = gethostbyaddr($ip);
> 
> ===========================
> 

Oh... btw... I just gave a real look at that piece of code. You
might want to write it a bit different:

if (getenv ("HTTP_X_FORWARDED_FOR")) {
  $ip = getenv ("HTTP_X_FORWARDED_FOR");
} else {
  $ip = getenv ("REMOTE_ADDR");
}
$host = gethostbyaddr ($ip);

The other one does work, but quoting makes a lot of difference in
your logfiles. Without quoting yet get al kinds of warnings.

-- 

* R&zE:

-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- 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
-- ««««««««««««««««««««««««

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to