- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 53 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Server Status Script Block Help [ ]
Author
Message
LunaticStriker
Nuke Cadet
Joined: Jul 27, 2005
Posts: 5
Posted:
Tue Aug 02, 2005 8:23 pm
I have tried for like 3-4 hours trying to get this php script into a block but have failed vainly. Can someone please help me.
Code:
<?php
error_reporting(0);
$Servers = array
("Login Server"=>"[Removed IP]:6900\n"
,"Char Server"=>"[Removed IP]:6121\n"
,"Map Server"=>"[Removed IP]:5121\n"
,"MySQL Server"=>"[Removed IP]:3306");
$cntr = 1;
while(list($ServerName,$IPnPORT)=each($Servers)){
list($IPAddress,$Port)=explode(":",$IPnPORT);
if(($cntr%2)== 1){
$bgColor = "F5F5F5";
}else{
$bgColor = "F5F5F5";
}
if($fp=fsockopen($IPAddress,$Port,$error_no,$error_str,(float)0.5)) {
echo("<TR align=\"right\" bgcolor=$bgColor style=\"color:BLACK;font-size:8pt;font-family:Arial;\"><TD>$ServerName </TD><TD align=\"left\"><IMG SRC=online.gif ALT=\"Server Online\"></TD></TR>");
fclose($fp);
}else{
echo("<TR align=\"right\" bgcolor=$bgColor style=\"color:BLACK;font-size:8pt;font-family:Arial;\"><TD>$ServerName</TD><TD align=\"left\"><IMG SRC=offline.gif ALT=\"Server Offline\"</font></TD></TR>");
}
$cntr++;
}
?>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum