Website Open Port Check
<?
$domain = "sz.ma.cx";
set_time_limit("0");
echo "http://$domain<BR><BR>";
function online($what,$link,$port) {
echo "<TABLE cellSpacing=0 cellPadding=1 width=50%><TR>";
echo "<TD width=50>$what";
$churl = @fsockopen($link, $port, $errno, $errstr, 20);
echo "<TD align=left><TABLE bgcolor=silver cellSpacing=1 cellPadding=1><TR>";
if (!$churl) { echo "<TD align=center bgcolor=red width=80>OFFLINE"; }
else { echo "<TD align=center bgcolor=#00FF00 width=80>ONLINE"; }
echo "</TABLE></TABLE>";
}
online("HTTP","google.com","80");
online("FTP","google.com","21");
online("SSH","google.com","22");
online("DNS","google.com","53");
online("mySQL","google.com","3306");
online("POP3","google.com","110");
online("SMTP","google.com","25");
?>