[FX.php List] [OFF] Getting visitor's IP
Jonathan Schwartz
jschwartz at exit445.com
Thu Aug 21 09:47:13 MDT 2008
Bob,
Yup. I went down this path.
Turns out that the PHP command is different depending on...err...the
PHP version and/or platform?...I think.
I believe the answer lies in what the phpinfo() says for the server being used.
Bottom line, this one worked for me when the others didn't:
$IP = $_SERVER['HTTP_PC_REMOTE_ADDR'];
J
>That's what I *thought* it was, but when I try it on my server here,
>I get the server's IP and not mine. I tried it from my iPhone, which
>isn't even on the same network, and it does the same thing.
>
>Try this and tell me what you see: http://comparisons.advantastar.com/test.php
>
>I bet you see 66.253.81.205...
>
>BP
>
>
>On Aug 21, 2008, at 10:34 AM, Troy Meyers wrote:
>
>>Bob,
>>
>>$_SERVER['REMOTE_ADDR'] works for me, really does give address the
>>user's request comes from...
>>
>>-Troy
>
>_______________________________________________
>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