Heya!
I am going to make another website that shows how many players that are online on my servers.
I'm a HTML/CSS webdesigner and I am learning PHP atm, but I need some help with a PHP-script.
I want my external website to show "Players online: xxx/750"
Just like my gesior aac does. But how do I do? I know that it takes the information from the "/config/serverstatus"-file, but I don't know the code to include it.
I tested to do it the way gesior aac's has it:
But then I get those errors: http://www.zantera.net/index2.php
Thanks in advance!
I am going to make another website that shows how many players that are online on my servers.
I'm a HTML/CSS webdesigner and I am learning PHP atm, but I need some help with a PHP-script.
I want my external website to show "Players online: xxx/750"
Just like my gesior aac does. But how do I do? I know that it takes the information from the "/config/serverstatus"-file, but I don't know the code to include it.
I tested to do it the way gesior aac's has it:
Code:
<?PHP
$config[helga] = parse_ini_file('http://helgaot.com/config/serverstatus');
$config[zeltenia] = parse_ini_file('http://zeltenia.com/config/serverstatus');
if($config['helga']['serverStatus_online'] == 1)
echo '
Players Online: '.$config['helga']['serverStatus_players'].' / '.$config['helga']['serverStatus_playersMax'].'<br />';
else
echo '<font color="red"><b>HelgaOT server Offline</b></font>';
if($config['zeltenia']['serverStatus_online'] == 1)
echo '
Players Online: '.$config['zeltenia']['serverStatus_players'].' / '.$config['zeltenia']['serverStatus_playersMax'].'<br />';
else
echo '<font color="red"><b>Zeltenia server Offline</b></font>';
?>
But then I get those errors: http://www.zantera.net/index2.php
Thanks in advance!