Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm php-scripting behind a firewall

Status
Not open for further replies.

sirugo

Programmer
Aug 1, 2000
162
SE
I'm php-scripting behind a firewall, on Windows IIS 5.
The "REMOTE_ADDR" contains the proxy-ip only.

I want to get the clients' IP-adresses using "HTTP_X_FORWARDED_FOR".

When I use phpinfo() to find out at what comes out of each call I see no "HTTP_X_FORWARDED_FOR".

Do I have to activate "HTTP_X_FORWARDED_FOR" on the server to get the client IP?

Thx
 
Thanks but I have tried that and it comes out emtpy.

$_SERVER['REMOTE_ADDR']
will show the proxy-ip though

Is this a proxy-matter that can only be solved in the proxy itself?
Also computers behind the firewall give the proxy-ip when they use the scripts.
As a matter of fact all computers except those that have fixed ips show the same proxy-ip.
 
If you perform:

print_r ($_SERVER);

Do you get anything that might be useful? The online manual states that your web server may provide to PHP more elements in $_SERVER than are documented. (It also states there could be fewer, too.) Want the best answers? Ask the best questions: TANSTAAFL!
 
I get about the same information.
What actually slips through is the http-user-agent that the visitor is using, and the operating system.

But when it comes to ips it's only one available and it's the one from the proxy itself.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top