Jump to content

how to test Proxy:IP


etusha

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/106356-how-to-test-proxyip/#findComment-545177
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.