addServer([
'type' => 'dayz',
'host' => '82.64.214.194:3222',
'options' => [
'query_port' => 27022,
],
]);
// Define the servers you wish you query
//$GameQ = new \GameQ\GameQ(); // or //$GameQ = \GameQ\GameQ::factory();
$GameQ->setOption('timeout', 3); // 3 seconds
$results = $GameQ->process();
$data = json_decode($readjson);
// class
$name = $data->{'name'};
$map = $data->{'map'};
$password = $data->{'password'};
$game = $data->{'raw'}->{'game'};
$secure = $data->{'raw'}->{'secure'};
$numplayers = $data->{'raw'}->{'numplayers'};
$version = $data->{'raw'}->{'version'};
$tags = $data->{'raw'}->{'tags'};
//$dedicated = $data->{'raw'}->{'rules'}->{'dedicated'};
//$island = $data->{'raw'}->{'rules'}->{'island'};
$connect = $data->{'connect'};
$ping = $data->{'ping'};
$time = "$tags[38]$tags[39]:$tags[41]$tags[42]";
$battleye = substr($tags,0,8);
$hive = substr($tags,18,8);
$players = $data->{'players'};
//if(empty($players))
// $players = "0";
//if (empty($players)) { "0"; }
//$playersuser = substr($players,0,8);
//$players = $data->{'array_filter($players)'};
//$player = $data->{'players'};
?>
Dayz ToX Server:
Server Name | IP server | Ping | Player Info | Joueurs | Version |
|
| |
|
| |
Player:
| print_r ";print_r($players);
?>
|