addServer([
'type' => 'dayz',
'host' => '82.64.214.194:3201',
'options' => [
'query_port' => 27021,
]
]);
// 'type' => 'dayz',
// 'host' => '82.64.214.194:2303',
// 'options' => [
// 'query_port' => 27023,
// ],
// 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();
//print_r($results);
//echo "
// var dump
";
//var_dump(json_decode($readjson, true));
//echo " // echo
";
// echo $readjson
";
//$data1 = json_decode("$readjson", true);
//echo "//Print data1
" ;
//print_r($data1);
//echo "
";
$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);
?>
|