• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Server Status

Nefs

Nefs Staff
Joined
Jul 15, 2009
Messages
521
Reaction score
7
Location
Barcelona (Spain)
Hello, i will know how i can add on my tibiacom layout, where the server status

Players Online - XX
Player Record - XX
Server Uptime - XX

With this i can learn some php xD

thanks!
 
:):(

<?PHP if($config['status']['serverStatus_online'] == 1) echo '<a ><li class="light"><font color="limegreen" size="2"><b>Server Online</b></font>';
else echo '<li class="light"><font color="red" size="2"><b>Sever Offline</b></font>'; ?></li>
<a ><li class="dark" >Uptime: <?PHP if($config['status']['serverStatus_online'] == 1) echo $config['status']['serverStatus_uptime'].''; else echo '0h 0m'; ?></li>
<a ><li class="light">Players Online: <?PHP if($config['status']['serverStatus_online'] == 1) echo $config['status']['serverStatus_players'].''; else echo '0'; ?></li>
<a ><li class="dark">Record: <?PHP $record = $SQL->query('SELECT `record` FROM `server_record` ORDER BY `record` DESC LIMIT 1;'); foreach($record as $result) { echo ''.$result['record'].''; } ?></li></div>
 
if you really wants to know php open server with fsocket~ send special package get your xml respond and parse it with simple xml
 
PHP:
<?PHP
			if($config['status']['serverStatus_online'] == 1)
				echo '<li><a href="#"><font color="green"><b>Server Online</b></font></a> <br> <li><a href="index.php?subtopic=whoisonline&world=0">Players online: '.$config['status']['serverStatus_players'].'</a> <br> <li><a href="#">Uptime: '.$config['status']['serverStatus_uptime'].'</a>';
			else
				echo '<li><font color="red"><b>Server Offline</b></font><a></li>';
?>
<li><a href="index.php?subtopic=record"><?PHP $zapytanie = $SQL->query('SELECT `record` FROM `server_record` ORDER BY `record` DESC LIMIT 1;'); foreach($zapytanie as $wynik) { echo 'Record: '.$wynik['record'].''; } ?></a></li>
:):(
 
if you really wants to know php open server with fsocket~ send special package get your xml respond and parse it with simple xml

Really? He wanted to get the script for what he wants and not have a piece of information. :)
 
PHP:
<?PHP
			if($config['status']['serverStatus_online'] == 1)
				echo '<li><a href="#"><font color="green"><b>Server Online</b></font></a> <br> <li><a href="index.php?subtopic=whoisonline&world=0">Players online: '.$config['status']['serverStatus_players'].'</a> <br> <li><a href="#">Uptime: '.$config['status']['serverStatus_uptime'].'</a>';
			else
				echo '<li><font color="red"><b>Server Offline</b></font><a></li>';
?>
<li><a href="index.php?subtopic=record"><?PHP $zapytanie = $SQL->query('SELECT `record` FROM `server_record` ORDER BY `record` DESC LIMIT 1;'); foreach($zapytanie as $wynik) { echo 'Record: '.$wynik['record'].''; } ?></a></li>
:):(

doesnt work :S look
Your Code
Code:
<?PHP
            if($config['status']['serverStatus_online'] == 0)
                echo '<li><a href="#"><font color="green"><b>Server Online</b></font></a> <br> <li><a href="index.php?subtopic=whoisonline&world=0">Players online: '.$config['status']['serverStatus_players'].'</a> <br> <li><a href="#">Uptime: '.$config['status']['serverStatus_uptime'].'</a>';
            else
                echo '<li><font color="red"><b>Server Offline</b></font><a></li>';
?>
<li><a href="index.php?subtopic=record"><?PHP $zapytanie = $SQL->query('SELECT `record` FROM `server_record` ORDER BY `record` DESC LIMIT 1;'); foreach($zapytanie as $wynik) { echo 'Record: '.$wynik['record'].''; } ?></a></li>

The image
serverstatus.png


I use Paxton Dynamic Server Status, and i will show Players Online - XX, Server Uptime - XX


Thanks
 
Back
Top