saw you wanted the players on as well:
PHP Code:
<?php
$telnet = new telnet;
if($telnet->connect() ) {
// We are connected... yay!
echo "<h1>Server is <span style='background-color:green;'>UP</span></h1>";
echo "<p>" . $telnet->uptime() . "</p>";
echo "<table><tr><td>Name</td><td>Zone</td></tr>";
$players = $telnet->whoall();
foreach( array_keys($players) as $key) {
echo "<tr><td>" . $players[$key]['Name'] . "</td><td>" . $players[$key]['ZoneLong'] . "</td><tr>";
}
echo "</table>";
} else {
// OH NOS!
echo "<h1>Server is <span style='background-color:red;'>DOWN</span></h1><p>" . $telnet->message[0] ."</p>";
}
?>