[ciapug] php SuperGlobals issue
vanish at dreamscapevisionery.com
vanish at dreamscapevisionery.com
Tue Mar 7 09:09:08 CST 2006
I'm hoping someone out there can figure out how I've screwed this up...
In an include file, I have the following code:
$sec_ip = $_SERVER['REMOTE_ADDR'];
Which should set the variable to the IP address of the visitor's PC. In my
setup, however, it displays the server's IP instead. I tried replacing that
with:
$sec_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
to see if the problem was a proxy issue, but alas no ip is shown. (Yes, I tried
the getenv method as well and the $ENV method also. All return the same result)
Setting the variable form the original code page has the same effect so it's not
some funky problem caused by being in an include file.
Any ideas? Anyone? Bueller? Bueller?
Chris VC
More information about the ciapug
mailing list