Esempio n. 1
0
 if (empty($ip) or empty($port) or empty($rconpass)) {
     echo '<b>Please go back and provide all the needed data.<br />';
     bottom($start);
     die;
 }
 //    require_once('scripts/source_query.php');
 $server = new SourceServer($ip, $port);
 try {
     $server->rconAuth('$rconpass');
 } catch (RCONNoAuthException $e) {
     trigger_error('Could not authenticate with the game server.', E_USER_ERROR);
     bottom($start);
     die;
 }
 $server->rconExec('status');
 $info = $server->GetInfo();
 if (!$info['name']) {
     echo '<b> There is an error with the information you supplied, please go back and verify.</b>';
     bottom($start);
     die;
 }
 echo '<b>Network version:</b> ' . $info['net_ver'] . '<br />';
 echo '<b>Server name:</b> ' . $info['name'] . '<br />';
 echo '<b>Game directory:</b> ' . $info['dir'] . '<br />';
 echo '<b>Game description:</b> ' . $info['desc'] . '<br />';
 echo '<b>Server OS:</b> ' . $info['os'] . '<br />';
 echo '<b>Rcon Password:</b> ' . $rconpass . '<br />';
 echo '<b>Private:</b>';
 if ($info['private']) {
     print "Yes<br />";
 } else {