All pastes #123286 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-08-09 05:08 UTC
rendered paste body
<?php 

error_reporting(0); 

$IP = array( 
"Login Server:" => "YourServerIP:2106", 
"Game Server:" => "YourServerIP: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></td>"; 
** 
echo "</tr>"; 
** 

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

?>