Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
class track
{
var $serverList;
var $imagesDir;
var $MaxURLsymbols;
public function getXMLdata()
{
$get = file_get_contents($this -> serverList);
$xml = simplexml_load_string($get);
$servers = array();
for($i = 0; $i < count($xml -> server); $i++)
{
$servers['address'][] = $xml -> server[$i] -> address;
$servers['port'][] = $xml -> server[$i] -> port;
$servers['location'][] = $this -> getLocation($xml -> server[$i] -> location);
$servers['software'][] = $this -> getSoftware($xml -> server[$i] -> software);
$servers['version'][] = $xml -> server[$i] -> version;
$servers['users'][] = $xml -> server[$i] -> users;
$servers['channels'][] = $xml -> server[$i] -> channels;
$servers['games'][] = $xml -> server[$i] -> games;
$servers['description'][] = $this -> getDescription($xml -> server[$i] -> description);
$servers['platform'][] = $this -> getPlatform($xml -> server[$i] -> platform);
$servers['url'][] = $this -> getURL($xml -> server[$i] -> url);
$servers['contact_name'][] = $xml -> server[$i] -> contact_name;
$servers['contact_email'][] = $this -> getEmail($xml -> server[$i] -> contact_email);
$servers['uptime'][] = $this -> getUptime((int)$xml -> server[$i] -> uptime);
$servers['total_games'][] = $this -> totalGames($xml -> server[$i] -> total_games);
$servers['logins'][] = $this -> totalLogins($xml -> server[$i] -> logins);
}
return $servers;
}
$servers = array
(
'address' => array
(
'69.23.101.171',
'93.187.139.146',
'77.85.244.176',
'85.187.16.2',
'194.187.205.22',
'70.126.123.196'
),
'port' => array
(
'6112',
'6112',
'6112',
'6112',
'6112',
'6112'
),
'location' => array
(
'United States',
'Romania',
'Bulgaria',
'Bulgaria',
'Russian Federation',
'United States'
),
'software' => array
(
'PvPGN',
'PvPGN',
'PvPGN',
'PvPGN',
'PvPGN',
'PvPGN'
),
'version' => array
(
'1.8.5',
'1.8.5',
'1.8.5',
'1.8.5',
'1.99.0-SVN',
'1.8.5'
),
'users' => array
(
'0',
'221',
'4',
'89',
'0',
'0'
),
'channels' => array
(
'1',
'1',
'1',
'1',
'1',
'1'
),
'games' => array
(
'0',
'100',
'1',
'40',
'0',
'0'
),
'description' => array
(
'server #1',
'server #2',
'server #3',
'server #4',
'server #5',
'server #6'
),
'platform' => array
(
'windows',
'windows',
'linux',
'freebsd',
'windows',
'windows'
),
'url' => array
(
'http://site1.com',
'http://site2.com',
'http://site3.com',
'http://site4.com',
'http://site5.com',
'http://site6.com'
),
'contact_name' => array
(
'Admin #1',
'Admin #2',
'Admin #3',
'Admin #4',
'Admin #5',
'Admin #6'
),
'contact_email' => array
(
'admin@site1.com',
'admin@site2.com',
'admin@site3.com',
'admin@site4.com',
'admin@site5.com',
'admin@site6.com'
),
'uptime' => array
(
'1',
'2',
'3',
'4',
'5',
'6'
),
'total_games' => array
(
'1',
'2',
'3',
'4',
'5',
'6'
),
'logins' => array
(
'1',
'2',
'3',
'4',
'5',
'6'
),
);
array_multisort
(
$servers['users'], SORT_DESC,
$servers['address'], SORT_DESC,
$servers['port'], SORT_DESC,
$servers['location'], SORT_DESC,
$servers['software'], SORT_DESC,
$servers['version'], SORT_DESC,
$servers['channels'], SORT_DESC,
$servers['games'], SORT_DESC,
$servers['description'], SORT_DESC,
$servers['platform'], SORT_DESC,
$servers['url'], SORT_DESC,
$servers['contact_name'], SORT_DESC,
$servers['contact_email'], SORT_DESC,
$servers['uptime'], SORT_DESC,
$servers['total_games'], SORT_DESC,
$servers['logins'], SORT_DESC
);
print_r($servers);
class track
{
var $serverList;
var $imagesDir;
var $MaxURLsymbols;
var $serversPerPage;
var $countServers;
var $tracker;
var $totalPages;
var $geoIPoverride;
public function getXMLdata()
{
$get = file_get_contents($this -> serverList);
$xml = simplexml_load_string($get);
$servers = array();
$start = (isset($_GET['start'])) ? (int)$_GET['start'] : 0;
$this -> countServers = count($xml -> server);
for($j = 0, $i = $start; $i <= $this -> countServers; $i++)
{
if(!empty($xml -> server[$i] -> address))
{
$servers['address'][] = $xml -> server[$i] -> address;
$servers['port'][] = $xml -> server[$i] -> port;
$servers['location'][] = $this -> getLocation($xml -> server[$i] -> location, $xml -> server[$i] -> address);
$servers['software'][] = $this -> getSoftware($xml -> server[$i] -> software);
$servers['version'][] = $xml -> server[$i] -> version;
$servers['users'][] = $xml -> server[$i] -> users;
$servers['channels'][] = $xml -> server[$i] -> channels;
$servers['games'][] = $xml -> server[$i] -> games;
$servers['description'][] = $this -> getDescription($xml -> server[$i] -> description);
$servers['platform'][] = $this -> getPlatform($xml -> server[$i] -> platform);
$servers['url'][] = $this -> getURL($xml -> server[$i] -> url);
$servers['contact_name'][] = $xml -> server[$i] -> contact_name;
$servers['contact_email'][] = $this -> getEmail($xml -> server[$i] -> contact_email);
$servers['uptime'][] = $this -> getUptime((int)$xml -> server[$i] -> uptime);
$servers['total_games'][] = $this -> totalGames($xml -> server[$i] -> total_games);
$servers['logins'][] = $this -> totalLogins($xml -> server[$i] -> logins);
if($j >= $this -> serversPerPage)
break;
else
$j++;
}
}
array_multisort
(
$servers['users'], SORT_DESC,
$servers['address'], SORT_DESC,
$servers['port'], SORT_DESC,
$servers['location'], SORT_DESC,
$servers['software'], SORT_DESC,
$servers['version'], SORT_DESC,
$servers['channels'], SORT_DESC,
$servers['games'], SORT_DESC,
$servers['description'], SORT_DESC,
$servers['platform'], SORT_DESC,
$servers['url'], SORT_DESC,
$servers['contact_name'], SORT_DESC,
$servers['contact_email'], SORT_DESC,
$servers['uptime'], SORT_DESC,
$servers['total_games'], SORT_DESC,
$servers['logins'], SORT_DESC
);
return $servers;
}
for($i = 0; $i < count($servers['address']); $i++)
{
echo '
<table class="tablica" align="center" width="99%">
<tr class="row1">
<td width="12%">' . $servers['address'][$i] . '</td>
<td width="12%">' . $servers['location'][$i] . '</td>
<td width="12%">' . $servers['url'][$i] . '</td>
<td width="12%"><a href="mailto:nospam.' . $servers['contact_email'][$i] . '">' . $servers['contact_name'][$i] . '</a></td>
<td width="12%">' . $servers['uptime'][$i] . '</td>
<td width="3%"><center>' . $servers['platform'][$i] . '</center></td>
<td width="12%">' . $servers['software'][$i] . ' ' . $servers['version'][$i] . '</td>
<td width="12%">' . $servers['users'][$i] . '</td>
<td width="12%">' . $servers['games'][$i] . '</td>
</tr>
<tr class="row1">
<td colspan="7">' . $servers['description'][$i] . '</td>
<td><span style="color: #999">' . $servers['logins'][$i] . '</span></td>
<td><span style="color: #999">' . $servers['total_games'][$i] . '</span></td>
</tr>
</table>
<br />';
}
if(!array_multisort
(
$servers['users'], SORT_DESC,
$servers['address'], SORT_DESC,
$servers['port'], SORT_DESC,
$servers['location'], SORT_DESC,
$servers['software'], SORT_DESC,
$servers['version'], SORT_DESC,
$servers['channels'], SORT_DESC,
$servers['games'], SORT_DESC,
$servers['description'], SORT_DESC,
$servers['platform'], SORT_DESC,
$servers['url'], SORT_DESC,
$servers['contact_name'], SORT_DESC,
$servers['contact_email'], SORT_DESC,
$servers['uptime'], SORT_DESC,
$servers['total_games'], SORT_DESC,
$servers['logins'], SORT_DESC
))
return 'failed to sort';
else
return $servers;