";
$checkvar = "";
for($i=0;$i < count($proxylist);$i++)
{
$checkvar = fsockopen($proxylist[$i]["ip"] , $proxylist[$i]["poort"], &$errno, &$errstr, $timeout);
if($checkvar!="")
{
print $proxylist[$i]["ip"].":".$proxylist[$i]["poort"]."
";
}
$checkvar="";
}
}
function showoffline($timeout=2)
/*
show all offline proxies
*/
{
include("proxylist.php");
print "show offline
";
$checkvar = "";
for($i=0;$i < count($proxylist);$i++)
{
$checkvar = fsockopen($proxylist[$i]["ip"] , $proxylist[$i]["poort"], &$errno, &$errstr, $timeout);
if($checkvar=="")
{
print $proxylist[$i]["ip"].":".$proxylist[$i]["poort"]."
";
}
$checkvar="";
}
}
}
#example make controller
$controller = new proxyfunction();
#example print ip
print $controller->getip();
#example check ip
print $controller->exist($controller->getip());
#example show online
$controller->showonline(3);
#example show offline
$controller->showoffline(3);
?>