All pastes #42750 Raw Edit

Something

public text v1 · immutable
#42750 ·published 2006-02-22 09:05 UTC
rendered paste body
<?php

error_reporting(0);

$IP = array(
"<font color=blue>Login Server : </font>" => "82.78.192.246 :2106",
"<font color=blue>Game server:</font>" => "82.78.192.246 :7777",
);

echo "<center><table><tr>";

while(list($ServerName,$Host)=each($IP)) {
list($IPAddress,$Port)=explode(":",$Host);
echo "<td>$ServerName</td>";
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5)) {
echo "<td><font color=green><b>Online</b></font></td>";
fclose($fp);
}
else {
echo "<td><font color=#ff0000><b>Offline</b></font></td>";
}
echo "</tr>";
}

echo "</table></center>";

?>