php - Get user IP over proxy. -


i'm not able users ip in regular way due tcp proxying. need alternative.

i tried this:

$ip = file_get_contents('http://wtfismyip.com/text'); 

output server ip. there way can users ip?

there multiple ways can this.

depending on proxy might want see if x-forwarded-for http://en.wikipedia.org/wiki/x-forwarded-for set.

jou have js on client check ip , send request. how client's ip address using javascript only?


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -