I'm not able to get the users ip in the regular way due to tcp proxying. So I need an alternative.
I tried this:
$ip = file_get_contents('http://wtfismyip.com/text');
Output was server ip. Is there any way I can get the users ip?
I'm not able to get the users ip in the regular way due to tcp proxying. So I need an alternative.
I tried this:
$ip = file_get_contents('http://wtfismyip.com/text');
Output was server ip. Is there any way I can get the users ip?
There are multiple ways you can do this.
Depending on the proxy you might want to see if x-forwarded-for http://en.wikipedia.org/wiki/X-Forwarded-For is set.
Jou could have a JS on the client check the IP and send it with your request. How to get client's IP address using javascript only?