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
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
Share on other sites

The reason for a proxy server is to hide that information!  A proxy server sends its ip in the headers but not it's users ip.  You can see everything sent in the headers that the server recieves this way:

[code]<?php
    print_r($_SERVER);
?>[/code]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.