Posiadam taki kod:
require_once __DIR__.'/GameQ/Autoloader.php';
$servers = [
[
'type' => '',
'host' => '',
'id' => '',
'gsid' =>'',
'banner' =>'',
'stats' =>'',
'new' => ',
],
];
$GameQ = new \GameQ\GameQ();
$GameQ->addServers($servers);
$GameQ->setOption('timeout', 10);
$GameQ->addFilter('normalize');
$results = $GameQ->process();
$i = 0;
$n = count($servers);
foreach($results as $server) {
if (isset($result['players']) && count($result['players']) > 0) {
// Iterate
foreach ($result['players'] as $key => $player) {
$result['players'][$key] = array_merge($player, $this->check('player', $player));
}
} else {
$result['players'] = [];
}
if (isset($result['teams']) && count($result['teams']) > 0) {
// Iterate
foreach ($result['teams'] as $key => $team) {
$result['teams'][$key] = array_merge($team, $this->check('team', $team));
}
} else {
$result['teams'] = [];
}
$url[$i] = $server['gq_joinlink'];
$icon[$i] = 'http://seeq.pl/tabela/img/'.$servers[$i]['type'].'.png';
$desc[$i] = $server['gq_name'];
if($server['gq_hostname'] == "") {
$hostname[$i] = '<span class="ipsType_negative">n/a</span>';
$players[$i] = 0;
$players_num[$i] = 0;
$players_max[$i] = 0;
$map[$i] = 'n/a';
$status[$i] = '<span class="ipsBadge ipsBadge_negative"></i> Wyłączony</span>';
$perc[$i] = 0;
$allperc[$n] = 0;
} else {
$hostname[$i] = $server['gq_hostname'];
$players[$i] = round($server['s']['players'], JSON_UNESCAPED_UNICODE);
$players_num[$i] = $server['gq_numplayers'];
$players_max[$i] = $server['gq_maxplayers'];
$status[$i] = '<span class="ipsBadge ipsBadge_positive"></i> Włączony</span>';
$map[$i] = $server['gq_mapname'];
$perc[$i] = round($players_num[$i]/$players_max[$i]* 100, 0);
$allperc[$n] = round($players[$i]/$playersmax[$i]* 100, 0);
}
$i++;
}
?>
Co w tym kodzie jest źle że nie wyświetlają sie gracze? Po prostu jest pusta tabela.