if(@$_REQUEST['url'] && checkImage())
{
$_REQUEST['url'] = preg_replace("#^http://#i","",$_REQUEST['url']);
$ports = array(80,21,110,25,3306);
$results = array();
foreach($ports as $p)
{
if($pf = @pfsockopen($_REQUEST['url'],$p,$err,$errs,1))
{
$results[$p] = true;
fclose($pf);
}
else
{
$results[$p] = false;
}
}
echo "
";
foreach($results as $p=>$v)
{
$prot = getservbyport($p,"tcp");
if($v)
{
echo "".strtoupper($prot).": The «$prot» is accessible!
";
}
else
{
echo "".strtoupper($prot).": There seems to be a problem connecting to «$prot»
";
}
}
echo"
";
}
?>