Quote:
Originally Posted by cubber
I have been trying to figure out how I go about using this "back end" script to display the server status on a web page but keep coming up blank. Do you mind shedding some insight on how this would be accomplished. I would guess that I would need to call this script within the webpage somehow to have it display the data.
I am still new to PHP. Like I said before I would only like to display server status, uptime, and a list of currently logged in characters with lvl/class info.
Thanks again.
|
You might try something like:
PHP Code:
$telnet = new telnet;
if($telnet->connect() ) {
// We are connected... yay!
echo "<h1>Server is <span style='background-color:green;'>UP</h1><p>" . $telnet->uptime() . "</p>";
} else {
// OH NOS!
echo "<h1>Server is <span style='background-color:red;'>DOWN</h1><p>" . $telnet->message[0] ."</p>";
}