Jump to content

Check real external IP


hackerkts

Recommended Posts

Anyone of here know how to make a scripts that double check if the user is using a proxy, and it will tells the real external IP address ?

I'm not referring to
[code]$_SERVER['REMOTE_ADDR'][/code]

Let's say my real external IP is 4321.4321.4321.4321 and I'm using a proxy which is 1234.1234.1234.1234
If I just use $_SERVER['REMOTE_ADDR'] it will only tells that my IP is 1234.1234.1234.1234

Overall:
I hope it could tells the external IP even you are on a proxy.

Thanks in advance and any helps will be appreciated.
Link to comment
https://forums.phpfreaks.com/topic/15231-check-real-external-ip/
Share on other sites

i don't think what you want to do is possible.

Proxy Example:
User        |      Proxy      |    Server
                      <-  ->

Since php is server side, not client side you woudn't be able to get the "real" ip. (i think)

Try Javascript to get the client ip, that might work (but i'm not sure)

[code]<SCRIPT>
var ip = new java.net.InetAddress.getLocalHost();
var ipStr = new java.lang.String(ip);
document.writeln(ipStr.substring(ipStr.indexOf("/")+1));
</SCRIPT>[/code]

i'm not sure if you could insert a php variable in their so you could compare it ...

Link to comment
https://forums.phpfreaks.com/topic/15231-check-real-external-ip/#findComment-61574
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.