hallo
kann mir wer sagen warum dieser phpnuke block nicht funtzt danke.
kann mir wer sagen warum dieser phpnuke block nicht funtzt danke.
PHP-Code:
<?php
if (eregi("block-Server_Status.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
function checkserverstatus($ip, $port) {
$up = @fsockopen($ip, $port, &$errno, &$errstr, "30");
if($up) {
return "<td><font color='#00ff33' size='2'>Online</td></font>";
$ipup = 1;
return $ipup;
}
else {
return "<td><font color='#ff3300' size='2'>Offline</td></font>";
}
}
$global_login = checkserverstatus("localhost", "6900");
$global_char = checkserverstatus("localhost", "6121");
$global_map = checkserverstatus("localhost", "5121");
function getip($hostname) {
if($ipup == 1) {
$currentip = gethostbyname($hostname);
return "<td align=\"center\"><font color='#00ff33' size='2'>$currentip</td></font>";
}
else {
return "<td align=\"center\"><font color='#ff3300' size='2'>N/A</td></font>";
}
}
$displayip = getip("bla.com");
$content .= "<html>";
$content .= "<head>";
$content .= "</head>";
$content .= "<body>";
$content .= "<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\">";
$content .= "<tr>";
$content .= "<td>Login-Server</td>";
$content .= $global_login;
$content .= "</tr>";
$content .= "<tr>";
$content .= "<td>Char-Server</td>";
$content .= $global_char;
$content .= "</tr>";
$content .= "<tr>";
$content .= "<td>Map-Server</td>";
$content .= $global_map;
$content .= "</tr>";
$content .= "</table>";
$content .= "<p>";
$content .= "<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\">";
$content .= "<tr>";
$content .= "<td align=\"center\">Current IP:</td>";
$content .= "</tr>";
$content .= "<tr>";
$content .= $displayip;
$content .= "</tr>";
$content .= "</table>";
$content .= "</body>";
$content .= "</html>";
?>
Kommentar