Parašė Enzo· 2008 Vas. 18 11:02:24
#2
Vienas:
openside("L2 Serveris");
error_reporting(0);
$IP = array("<center><b>LS STATUS</b><br>Serverio statusas: " => "127.0.0.1:5000",);
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><b>GS STATUS</b><br>Serverio statusas: " => "127.0.0.1:5000",);
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();
Kitas
openside("Serverio statusas");
$servo_pavadinimas='Ivedat savo nuoziura';
$servo_ip='iveskite cia servo ip';
$servo_loginport=iveskite cia login porta;
$servo_serverport=iveskite cia servo porta;
echo'
<table width="100%"> <tr> <td colspan="2"><center><b>'.$servo_pavadinimas.'</b></center></td> </tr> <tr> <td>Login:';
if($fp=fsockopen($servo_ip, $servo_loginport, $ERROR_NO, $ERROR_STR,(float)0.5))
echo"<span style='color:lime'>ON</span>";
else
echo"<span style='color:red'>OFF</span>";
echo('</td> <td>Game:');
if($fp=fsockopen($servo_ip, $servo_serverport, $ERROR_NO, $ERROR_STR,(float)0.5))
echo"<span style='color:lime'>ON</span>";
else
echo"<span style='color:red'>OFF</span>";
echo('</td> </tr>');
echo('</table>');
Redagavo Enzo· 2008 Vas. 18 11:02:31