minecraft-status/index.php
2020-10-06 13:49:23 +02:00

25 lines
No EOL
853 B
PHP

<html>
<head>
<link rel="stylesheet" href="main.css">
</head>
<body>
<?php
require_once('minestat.php');
$ms = new MineStat("localhost");
if($ms->is_online()) {
echo("<h3>Join on server.thisfro.ch!</h3>");
echo("<p>The Server is: </p>");
echo("<h2 class='online status'>online</h2>");
echo("<p>running version</p>");
printf("<h2>%s</h2><br>", $ms->get_versrion());
echo("<p>Players online</p>");
echo("<h2>%s / %s</h2>)"), $ms->get_current_players(), $ms->get_max_players();
}
else {
echo("<p>The Server is:</p>");
echo("<h2 class='offline status'>offline</h2>");
}
?>
</body>
</html>