Server State Box

Status
Not open for further replies.
Messy but effective lol

Code:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<?PHP
error_reporting(0);

$IP = array(
"<center><p></p>" => "ServerIpHere:10007",
); 

echo("<style type='text/css'>\n<!--\n .style1 {
	font-weight: bold;
	color: #009900;
}\n .style2 {
	font-weight: bold;
	color: #990000;
	text-decoration: blink;
}\n--></style>\n\n");
while(list($ServerName,$Host)=each($IP)) {
  list($IPAddress,$Port)=explode(":",$Host);
  echo("<TR><TD bgcolor='#FFFFFF'>".$ServerName);
  if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5)) {
    echo("<span class='style1'>Online</span>");
    fclose($fp);
  }
  else {
    echo ("<span class='style2'>Offline</span>");
  }
  echo ("</CENTER></TD></TR>\n");
}
?>
<style type="text/css">
<!--
body,td,th {
color: #000000;
}
.style2 {
color: #000000
}
.style3 {
font-size: 18px
}
.style4 {
font-size: 16px;
color: #0099FF;
}
.style1 {
color:#009900
}
-->
</style>
 
damn man, are you blind or trying to say something..?

the php online/offline script is stickied. READ THEM NEXT TIME before you post anything. infracted
 
Status
Not open for further replies.
Back