This repository has been archived on 2022-03-01. You can view files and clone it, but cannot push or open issues or pull requests.
FS22_Webstats/server.php

22 lines
695 B
PHP

<?php
ini_set("DISPLAY_ERRORS", 1);
ERROR_REPORTING(E_ALL);
// require_once 'include/functions.php';
//require_once 'include/config.php';
REQUIRE_ONCE 'webStatsInclude.php';
//http://45.137.244.65:8620/feed/dedicated-server-stats.xml?code=H2UTei9J
$serverAddress = 'http://'. SERVER_IP .':'. SERVER_PORT .'/feed/dedicated-server-stats.xml?code='. SERVER_CODE;
$xml = getServerStatsSimpleXML($serverAddress, 'Server');
$server = $xml['game'];
if(is_null($server))
{
//$mapName = '<u><b><font color="red">SERVER OFFLINE</font></b></u>';
echo "```diff<br>
- SERVER OFFLINE<br>
```";
exit;
}
?>