[FX.php List] [OFF] Getting visitor's IP

Leo R. Lundgren leo at finalresort.org
Fri Aug 22 13:17:29 MDT 2008


I'm sorry, I haven't followed this thread almost at all, honestly.  
But reading the below quote makes me think that someone is wondering  
whether to use REMOTE_ADDR or HTTP_PC_REMOTE_ADDR.

If so, here's my suggestion:  $remoteHost = (strlen($_SERVER 
['HTTP_PC_REMOTE_ADDR']) ? $_SERVER['HTTP_PC_REMOTE_ADDR'] : $_SERVER 
['REMOTE_ADDR']);

I'm probably so off track here :-)


22 aug 2008 kl. 18.01 skrev Jonathan Schwartz:

> Kevin,
>
> Are you sure that it is OS X Server making the change?  I admit  
> that I never spent the time trying to nail down the source, but I  
> assumed that it was the PHP version or web server.  I have always  
> used OS X Server 10.4, yet have had to fiddle with the setting just  
> the same.
>
> Jonathan
>
>
>
>>
>> You *can*, but normalising them makes your code portable to other  
>> systems,
>> and future-proofs it against changes in OS X Server (what if  
>> suddenly they
>> revert to using REMOTE_ADDR?).
>
> -- 
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-370-5011
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list


-|



More information about the FX.php_List mailing list