Parašė kLx· 2007 Spa. 31 12:10:55
#4
openside("Serverio Statusas");
error_reporting(0);
$IP = array("<center>Login Server: " => "84.32.157.193:2106",);
while(list($ServerName,$Host)=each($IP)) {
list($IPAddress,$Port)=explode(":",$Host);
echo("<tr><td>".$ServerName);
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5)) {
echo("<img src='http://lineage2.com/images/server_online.png'>");
fclose($fp);
}
else {
echo ("<img src='http://lineage2.com/images/server_offline.png'>");
}
echo ("</center></td></tr>\n");
}
error_reporting(0);
$IP = array("<center>Game Server: " => "84.32.157.193:7779",);
while(list($ServerName,$Host)=each($IP)) {
list($IPAddress,$Port)=explode(":",$Host);
echo("<tr><td>".$ServerName);
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5)) {
echo("<img src='http://lineage2.com/images/server_online.png'>");
fclose($fp);
}
else {
echo ("<img src='http://lineage2.com/images/server_offline.png'>");
}
echo ("</center></td></tr>\n");
}
closeside();
?>
imk ;) gali pridėt kiek nori serverių , manau esmę supratai :D kažkada šį kodą dar ramon papostino ;)
Redagavo kLx· 2007 Spa. 31 12:10:05