I have this PHP that displays server status -
[syntax=php]<html>
<head>
<style>
body{
width: 255px;
height: 45px;
}
</style>
</head>
<body>
<?php
/*
#####################################
# PlayerCraft - Server status check #
#####################################
*/
//Change this settings to your servers
$server = array(
"ip" => "109.70.149.244",
"port" => "25565",
);
//This is what does the checking, don't care about this code.
$check = @fsockopen($server['ip'], $server['port'], $errno, $errstr, 2.5);
if (!$check) {
//Server was offline
![Sad :(](./images/smilies/icon_e_sad.gif)
echo '<h2 style="color: #ff0000; text-align: center; font-family: arial; font-weight: bold;">OFFLINE</h2>';
} else{
//Server was online
![Smile :)](./images/smilies/icon_e_smile.gif)
echo '<h2 style="color: #008000; text-align: center; font-family: arial; font-weight: bold;">ONLINE</h2>';
}
?>
</body>
</html>[/syntax]
I also have the PHP taken from this websites tutorials, however I was wondering if someone could tell me what i would need to add to the above, to display the player counter?