anyway to get real ip address behind proxy?


Supreme Member
May 26, 2013
Reaction score
is it possible to get real ip address behind proxy?
I need it for an affiliate program
It will be great , if it can be done through php or python

any luck?
Someone can correct me on this, but I believe you need to write something in Java to accomplish this. It can be done though.
yes, some articles in the net, saying, it needs java/javascript , in that case,what will happen if the bot using a non java browser to view web pages anonymously
I posted something that might help:


In a nutshell, you check for the following server variables

If anyone of them are set and having a value, it's a proxy.
Last edited:
Try this php code
if (!empty($_SERVER['HTTP_CLIENT_IP']))
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
nxgweb ,its checking ip address only/

thanks gOgOl
also I add a flag for $_SERVER['REMOTE_ADDR']
I checked in my few test
if host name is different than the ipv4 then it also a proxy for sure

here the testing url

source code here:
if (!empty($_SERVER["HTTP_CLIENT_IP"]))
//check for ip from share internet
elseif (!empty($_SERVER["HTTP_X_FORWARDED_FOR"]))
// Check for the Proxy User
// This will print user's real IP Address
// does't matter if user using proxy or not.
echo "IPv4: ".$ip;

$via = $_SERVER['HTTP_VIA'];
$realip=  $_SERVER['X-REAL-IP'];
$proxyid = $_SERVER['HTTP_X_PROXY_ID'];

echo "<br/>Via: ".$via;
echo "<br/>realip: ".$realip;
echo "<br/>proxyid: ".$proxyid;

$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);

echo "<br/>Hostname: ".$hostname;

PS: it will more efficient , if some one come with more good proxy checker , like
Last edited:
There is no guaranteed way to know about the proxy unless you have a list of all the Proxies Ip addresses that exist (which seems highly unlikely).
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock