PHP cURL proxy checker
Most of the time I use server-side PHP scripts, because desktop proxy checkers don’t provide much flexibility. You don’t want to check, export and upload a list of proxies every time you need them, do you? That’s why PHP cURL is the best choice for me. Automation is the king!
So, how to check proxies with PHP? Let’s start with the proxy basics. What is an anonymous proxy? An anonymous proxy hides your IP address. Sometimes it informs a client that a proxy is being used. Sometimes it looks like a real host/user.
What should I look for when checking proxy anonymity? Make sure the real IP address is hidden. Check all variables that can expose your identity.
Warning! I’m not a security expert. Please let me know if any variable is missing from the list.
REMOTE_ADDR
REMOTE_HOST
HTTP_X_FORWARDED_FOR
HTTP_VIA
HTTP_CLIENT_IP
HTTP_PROXY_CONNECTION
FORWARDED_FOR
X_FORWARDED_FOR
X_HTTP_FORWARDED_FOR
HTTP_FORWARDED
HTTP_REFERER
Printing “bad” variables
Here is the first script (badvars.php) you need. It prints out required variables. Upload the file to a server and check if it’s working.
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>
<title>I know you</title>
</head>
<body>
<p><?php echo(”REMOTE_ADDR ” . $_SERVER['REMOTE_ADDR'] . “\n”); ?></p>
<p><?php echo(”REMOTE_HOST ” . $_SERVER['REMOTE_HOST'] . “\n”); ?></p>
<p><?php echo(”HTTP_X_FORWARDED_FOR ” . $_SERVER['HTTP_X_FORWARDED_FOR'] . “\n”); ?></p>
<p><?php echo(”HTTP_VIA ” . $_SERVER['HTTP_VIA'] . “\n”); ?></p>
<p><?php echo(”HTTP_CLIENT_IP ” . $_SERVER['HTTP_CLIENT_IP'] . “\n”); ?></p>
<p><?php echo(”HTTP_PROXY_CONNECTION ” . $_SERVER['HTTP_PROXY_CONNECTION'] . “\n”); ?></p>
<p><?php echo(”FORWARDED_FOR ” . $_SERVER['FORWARDED_FOR'] . “\n”); ?></p>
<p><?php echo(”X_FORWARDED_FOR ” . $_SERVER['X_FORWARDED_FOR'] . “\n”); ?></p>
<p><?php echo(”X_HTTP_FORWARDED_FOR ” . $_SERVER['X_HTTP_FORWARDED_FOR'] . “\n”); ?></p>
<p><?php echo(”HTTP_FORWARDED ” . $_SERVER['HTTP_FORWARDED'] . “\n”); ?></p>
<br>
<p><?php echo(”HTTP_REFERER ” . $_SERVER['HTTP_REFERER'] . “\n”); ?></p>
<p><?php echo(”HTTP_USER_AGENT ” . $_SERVER['HTTP_USER_AGENT'] . “\n”); ?></p>
</body>
</html>
Tags: PHP code, PHP cURL, PHP script, Proxy checker script, Review script PHP, Script code, Source code
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply