etusha Posted May 19, 2008 Share Posted May 19, 2008 hello all need a help how to test Proxy:IP Quote Link to comment Share on other sites More sharing options...
947740 Posted May 19, 2008 Share Posted May 19, 2008 You want to test if the user is using a proxy? Quote Link to comment Share on other sites More sharing options...
etusha Posted May 19, 2008 Author Share Posted May 19, 2008 no no i want to test IP if is proxy i want to create a similar page like proxy4free.com and hidemyass.com Quote Link to comment Share on other sites More sharing options...
DarkWater Posted May 19, 2008 Share Posted May 19, 2008 Please be more clear. Your question makes little sense. Quote Link to comment Share on other sites More sharing options...
jonsjava Posted May 19, 2008 Share Posted May 19, 2008 modified proxy checker for your needs: <?php /* Title: Proxy Detection Description: This will detect any suspicious open socket that the user is running and if found in an array, it will not let the user proceed to the website, and the ability to allow certain hosts to pass the scan. Usage: Name this page proxycheck.php and just include this include "proxycheck.php"; in any webpage you want protected. */ /* Modify these next few lines to whatever you like. */ $Ports = array('1080', '8080', '8000', '3128', '8888', '23', '80', '8081'); // To hold the list of ports. $AllowedHosts = array('localhost', 'allowedhost.com'); // To hold the list of allowed hosts. $DisallowedHosts = array('127.0.0.1.poo.com', 'something.msn.com'); // To hold the list of disallowed hosts. $Redirect = "http://www.google.com/"; // Redirect page $SocketTimeout = 1; // Higher the number, the longer it takes. /* End of modification. */ if ((!in_array ($REMOTE_ADDR, $AllowedHosts)) && (!in_array ($REMOTE_ADDR, $DisallowedHosts))) { $x = 1; while ($Ports[$x]) { $fSockPointer = fsockopen($REMOTE_ADDR, $Ports[$x], $errno, $errstr, $SocketTimeout); if (@$fSockPointer) { print "You are behind a proxy!"; fclose($fSockPointer); } $x++; } } else { print "you are not behind a proxy, as far as we can tell"; } ?> Didn't test it too much, so be warned. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.