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

Jonathan Schwartz jschwartz at exit445.com
Fri Aug 22 15:32:50 MDT 2008


Interesting.  What function is that?  Also, what purpose does strlen 
provide to the function?

Thx

>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
>
>
>-|
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list


-- 
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-370-5011


More information about the FX.php_List mailing list