Socks Proxy Scanner PHP Script

A simple socks proxy scanner php script, that uses to check a list of socks proxy servers’ online status.

Example:
123.234.12.32:3523
98.45.57.78:9823
23.32.44.23:3785
123.32.45.56:3453
34.75.56.234:9856

save above lines as “proxies.txt”.

Code:

$filename = "http://domain.tld/filename.ext"; //or a localpath.
$rel=file_get_contents($filename);
$ipset = explode("\n",$rel); // explode it based on your delimiter.
foreach($ipset as $ips)
{
$ipandport=explode(':',$ips);
//Porxy string format might be 123.156.189.112:8080
$host=$ipandport[0];
$i=(int)$ipandport[1];
$fp = @fsockopen("tcp://".$host,$i,$errno,$errstr,10);
// tcp:// because, socks4 uses TCP and socks5 uses TCP & UDP
if($fp)
{
echo("Result is $fp
“);
echo (“port ” . $i . ” open on ” . $host . “
“);
fclose($fp);
}
flush();
}
?>




Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Comment:

Google