<?
$action = $_POST["action"];
$portaddres = $_POST["portaddres"];
$ipaddres = $_POST["ipaddres"];
if($action == 'y'){
$port_array = explode(",",$portaddres);
echo "IP :".$ipaddres.'<br>';
for($i=0;$i<count($port_array); $i++){
ob_implicit_flush(true);
$fp = @fsockopen($ipaddres, $port_array[$i], $errno, $errstr, 2);
echo $port_array[$i];
ob_end_flush();
if($fp){ echo " <font color=#0000FF>Open</font><br>";
} else { echo " <font color=#FF0000>Close</font><br>";}
}
}
?>