her er et script der virker..
---- start -----
<?php
#
######################################################################
# Server Status Module
# ====================
# Version 1.0
#
# by:
#
# chmod (
http://www.the-toaster.com) (chmod@the-toaster.com)
#
######################################################################
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.
######################################################################
######################################################################
# Module Settings
######################################################################
$domain = "dit domainnavn eller ip";# Enter your domain name here
######################################################################
# End of main configuration
######################################################################
$index = 1;
function lookup($hport,$Something,$who){
$fp = fsockopen($who, $hport, &$errno, &$errstr, 4);
if (!$fp){
$data = "<tr><td width=\"50%\"><font face=\"Times New Roman\" color=\"#000000\"><strong>$Something :</td></strong></font><td width=\"60%\"><font color=\"#FF0000\"><strong>Offline Vedligehold</strong></font></td></tr>";
} else {
$data = "<tr><td width=\"50%\"><font face=\"Times New Roman\" color=\"#000000\"><strong>$Something :</strong></td></font><td width=\"60%\"><strong><font color=\"#008000\">Online</font> </strong></font></td></tr>";
fclose($fp);
}
return $data;
}
include("header.php");
if(isset($domain)){
echo "<h2>Server Status</h2>";
echo "<table border=\"0\" cellpadding=\"0\" width=\"100%\">";
echo "<tr><td width=\"50%\"><font face=\"Times New Roman\" color=\"#000000\"><strong>Hostname :</strong></td></font><td width=\"60%\"><strong>$domain</font> </strong></font></td></tr>";
######################################################################
# Edit you port configuration here
# Add or remove as many port numbers as you like, most of the ports
# are standard, but edit the list as you like."
#
# Format;
#
# echo lookup("portno","Port Description","$domain");
#
######################################################################
echo lookup("80","Http Server","$domain");
echo lookup("21","FTP Server","$domain");
echo lookup("3306","MySQL Server","$domain");
echo lookup("110","POP3 Mail Server","$domain");
echo lookup("25","SMTP Relay","$domain");
# echo lookup("8000","Web Mail Server","$domain");
######################################################################
# End of port configuration
######################################################################
echo "</table>";
# echo "<p>For NetCraft Uptime Statistics, click <b><a href=\"
http://uptime.netcraft.com/up/graph/?mode_u=off&mode_w=on&site=",$domain,"\" target=\"_blank\">here</a></b>.</p>";
# echo "<p><small>Created by: </small><a href=\"mailto:chmod@the-toaster.com\" target=\"_blank\"><small>chmod</small></a>";
include("footer.php");
}
else {
echo "<p><strong>Error</strong><br><small>Unable to check domain</small></p>";
include("footer.php");
}
?>
---- slut -----