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!

How to find the IP address on a machine using a Proxy?

Status
Not open for further replies.

anotherDeclan

Programmer
Mar 26, 2003
3
IE
Hi,

I have designed an intranet for a small office about 40 PC's. I am using PHP and I use peoples IP address to identify them. I use $REMOTE_ADDR to get their IP address but they are using a proxy server. Is there any way to get the IP address of the PC after it connects to the server via the proxy??

Cheers
 
That depends on the proxy. Some proxies set a [tt]X-Forwarded-For[/tt] header, which should be available as [tt]$_SERVER['X-FORWARDED-FOR'][/tt]. But there is no guarantee that this is set, and you shouldn't rely on it. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top