prøv at bygge vider på det her
<?php
$box = $HTTP_SERVER_VARS["SERVER_NAME"];
$boxip = $HTTP_SERVER_VARS["SERVER_NAME"] . " (" . gethostbyname($HTTP_SERVER_VARS["SERVER_NAME"]) . ")";
$time = $_SERVER["REMOTE_TIME"];
?>
<table class="centreboxcontent" width="100%">
<tr>
<td width="100%">
<center>
<br><br>
<p><b>System Uptimes</b></p>
<p> <?php echo $box; ?>:
<script language="php">
$date = (date("d/m/y - H:i:s"));
$uptime = system(uptime);
</script>
</p>
<p><br><b>System information</b><?
$noc_http = fsockopen("$box", 80, $errno, $errstr, 30);
if(!$noc_http) {
$noc_http = "red";
} else {
fclose($noc_http);
$noc_http = "green";
}
$noc_ftp = fsockopen("localhost", 21, $errno, $errstr, 30);
if(!$noc_ftp) {
$noc_ftp = "red";
} else {
fclose($noc_ftp);
$noc_ftp = "green";
}
$noc_mysql = fsockopen("mysql", 3306, $errno, $errstr, 30);
if(!$noc_mysql) {
$noc_mysql = "red";
} else {
fclose($noc_mysql);
$noc_mysql = "green";
}
?>
<?
$tid = time();
echo "$tid";
?>
</p>
<table class="centreboxcontent" width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>
</td>
<td>
http
</td>
<td>
ftp
</td>
<td>
mysql
</td>
</tr>
<tr>
<td>
<div align="center"><?php echo $box; ?></div>
</td>
<td>
<div align="center" style="font-size: 20pt; color: <? echo($noc_http); ?>" width="15" height="15">•</div>
</td>
<td>
<div align="center" style="font-size: 20pt; color: <? echo($noc_ftp); ?>" width="15" height="15">•</div>
</td>
<td>
<div align="center" style="font-size: 20pt; color: <? echo($noc_mysql); ?>" width="15" height="15">•</div>
</td>
</tr>
</td>
</tr>
</table>
<p> </p>
</center>
</td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="one_pix_line" height="1"><img src="
http://www.rolator.dk/pics/transparent.gif" width="1" height="1" /></td>
</tr>
</table>
<br>
<table class="centreboxcontent" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div style="FONT-SIZE: 20pt; COLOR: green" align="center" height="15" width="15">
•
</div>
</td>
<td>
= Kører
</td>
</tr>
<tr>
<td>
<div style="FONT-SIZE: 20pt; COLOR: red" align="center" height="15" width="15">
•
</div>
</td>
<td>
= Er nede
</td>
</tr>
</table>