I need to read my clients local ip address using php.
We use a proxy so I've read that I need to use this php:
<?php
$headers = apache_request_headers();
echo $headers["X-Forwarded-For"];
?>
The only thing I get is my Squid Server Ip.
Investigating further I've found that I have to set the forwarded_for parameter in my squid.conf to on
I've set my Squid server forwarded_for to everything (truncate, on, off...) and restarted Squid everytime: no luck at all.
I still just get my Squid server ip (and not my client's) using the above PHP script.
What could be wrong?
forwarded_foras the defaultonis almost always correct. – Michael Hampton Jul 25 '12 at 18:41