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']; print_r($Info); echo "

"; echo "InfoGT: " .$InfoGT . "
"; echo "ModDesc: " .$Info['ModDesc'] . "
"; echo "Hostname: " .$Info['HostName'] . "
"; echo "Players: " .$Info['Players'] . "
"; echo "MaxPlayers: " .$Info['MaxPlayers'] . "
"; echo "Secure: " .$Info['Secure'] . "
"; echo "Map: " .$Info['Map'] . "
"; echo "Os: " .$Info['Os'] . "
"; echo "Version: " .$Info['Version'] . "
"; echo "Port: " .$Info['GamePort'] . "
"; echo "GameID: " .$Info['GameID'] . "
"; echo "
test SQL"; $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'] ; // set the default timezone to use. Available since PHP 5.1 date_default_timezone_set('UTC+1'); $date = date('Y-m-d H:i:s'); $insql = "INSERT INTO $table (date,name,game,map,version,players,maxplayers,ping,timeserver,hive,battleye,connect,secure) VALUES ('$date','$HostName', '$Game', '$Map', '$Version', '$Players', '$MaxPlayers', '0', '2:20', 'hive', 'battleye', '$urlserv', '$Secure')"; if (mysqli_query($con, $insql)) { echo "New record created successfully"; } else { echo "Error: " . $insql . "
" . mysqli_error($con); } mysqli_close($con); ?>