"; 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"; */ // 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"; // if server down update sql if (empty($Info['HostName'])) { $HostName ="OFFLINE"; $Players ="0"; $ping ="0"; $timeserver="0"; $timespeed ="0"; $timespeedn="0"; $hive ="0"; $battleye ="0"; $insql = "INSERT INTO $table (date,name,players,maxplayers,map,game,version,timeserver,timespeed,timespeedn,battleye,hive,connect,secure,ping) VALUES ('$date','$HostName','$Players','$MaxPlayers','$Map','$Game','$Version','$timeserver','$timespeed','$timespeedn','$battleye','$hive','$urlserv','$Secure','$ping')"; if (mysqli_query($con, $insql)) { // echo "New record created successfully"; } else { echo "Error: " . $insql . "
" . mysqli_error($con); } //mysqli_close($con); exit ; } // REGEX TIME $regtimsev = "/[0-9]{1,2}[:][0-9]{1,2}/"; $result = preg_grep($regtimsev, explode(",", $InfoGT)); $timeserver = $result[8]; $regtimeacd = "/([0-9][.][0-9]{1})/"; $result = preg_grep($regtimeacd, explode(",", $InfoGT)); $timespeed = $result[5]; $regtimeacn = "/([0-9][.][0-9]{1})/"; $result = preg_grep($regtimeacn, explode(",", $InfoGT)); $timespeedn = $result[6]; // DEBUG $timespeed="2"; $timespeedn="4"; // HIVE //$result = explode(",", $InfoGT); $reghive = '/[^,]...(Hive)/'; $result = preg_grep($reghive, explode(",", $InfoGT)); $hive = $result[2]; // battleye check $regbattle = "/(battleye)/"; $result = preg_grep($regbattle, explode(",", $InfoGT)); $battleye = $result[0]; // SQL insert Query. $insql = "INSERT INTO $table (date,name,players,maxplayers,map,game,version,timeserver,timespeed,timespeedn,battleye,hive,connect,secure,ping) VALUES ('$date','$HostName','$Players','$MaxPlayers','$Map','$Game','$Version','$timeserver','$timespeed','$timespeedn','$battleye','$hive','$urlserv','$Secure','$ping')"; // Check if errors with SQL query if (mysqli_query($con, $insql)) { // echo "New record created successfully"; } else { echo "Error: " . $insql . "
" . mysqli_error($con); } mysqli_close($con); // end ?>