Connect( SQ_SERVER_ADDR, SQ_SERVER_PORT, SQ_TIMEOUT, SQ_ENGINE ); $Info = $Query->GetInfo( ); $Players = $Query->GetPlayers( ); } catch( Exception $e ) { $Exception = $e; } $Query->Disconnect( ); $Timer = Number_Format( MicroTime( true ) - $Timer, 4, '.', '' ); $InfoGT = $Info['GameTags']; // DEBUG /* print_r($Info); */ // Variables $HostName = $Info['HostName'] ; $Game = $Info['ModDesc'] ; $Version = $Info['Version'] ; $PLayers = $Info['Players']; $MaxPlayers = $Info['MaxPlayers'] ; $Secure = $Info['Secure'] ; $Map = $Info['Map']; $Os = $Info['Os'] ; $GamePort = $Info['GamePort'] ; $GameID = $Info['GameID'] ; $ping = "666"; // $mods = "0"; // REGEX de la mort. // time server $regtimsev = "/[0-9]{1,2}[:][0-9]{1,2}/"; $result = preg_grep($regtimsev, explode(",", $InfoGT)); foreach ($result as $key => $val) { $timeserver = $val; } // speedtime dayz $regtimeacc = "/etm[0-9]{1,2}[.][0-9]{1}/"; $result = preg_grep($regtimeacc, explode(",", $InfoGT)); foreach ($result as $key => $val) { $timespeed = trim($val,"entm.0"); } // speedtime night $regtimeacn = "/entm[0-9]{1,2}[.][0-9]{1}/"; $result = preg_grep($regtimeacn, explode(",", $InfoGT)); foreach ($result as $key => $val) { $timespeedn = trim($val,"entm.0"); } // HIVE $reghive = '/[^,]...(Hive)/'; $result = preg_grep($reghive, explode(",", $InfoGT)); foreach ($result as $key => $val) { $hive = $val; } // battleye $regbattle = "/(battleye)/"; $result = preg_grep($regbattle, explode(",", $InfoGT)); foreach ($result as $key => $val) { $battleye = $val; } // mod $regmod = "/(mod)/"; $result = preg_grep($regmod, explode(",", $InfoGT)); foreach ($result as $key => $val) { $mods = $val; } ?>