# Free for any use. There are no restrictions. # function Query($server, $cmd) { # http://wiki.beyondunreal.com/Legacy:UT_Server_Query $address = gethostbyname($server['0']); if (!$s = fsockopen('udp://' . $server['0'], $server['1'], $errno, $errstr, 2)) return False; stream_set_timeout($s, 2); fputs($s, "\\$cmd\\"); $info = fread($s, 8192); fclose($s); $info2 = explode('\\', "\\$info\\"); foreach ($info2 as $k => $v) { if (empty($v) || $v == '' || $v == ' ') continue; if (is_int($k/2)) $pv = $v; else $prettyinfo["$pv"] = htmlentities($v); } $prettyinfo['str'] = $info; return $prettyinfo; } # We do not use a masterserver but maintain the list here manually; This is a # feature and not a bug because the masterserve for the mod I play # (Infiltration) is not particuarly reliable. $servers = array( array('cerberon.net', 17778), # coop1 array('cerberon.net', 27778), # coop2 array('90.184.183.249', 7778), # wargamez array('xplod.de', '7778'), # xplod array('xplod.de', '8889'), # xplod2 array('84.255.245.128', '7778') # planetweed ); if (isset($_POST['server'])) $_GET['server'] = $_POST['server']; if (isset($_GET['server'])) { $a = explode(':', $_GET['server']); $servers = array(array($a['0'], $a['1'])); } $tbl = array(); foreach ($servers as $s) { $info = Query($s, 'status'); if (empty($info['str'])) { # Just hide the entry, servers seem to be going up & down more often than # the space shuttle ... #$tbl .= "Could not connect to {$s['0']} {$s['1']}"; continue; } if (isset($info['numplayers'])) { $numplayers = $info['numplayers'] . " Players:
\n"; $players = Query($s, 'players'); for ($i=0; $i<=$info['maxplayers']; $i++) { $k = "player_$i"; if ($players["$k"]) $numplayers .= $players["$k"] . "
\n"; } } else $numplayers = 'No players'; # XXX Detect DTAS in a better way if ($info['gametype'] == 'INFCoopUnrealGame') $gametype = 'Coop'; elseif ($info['gametype'] == 'INFg_EASGame') $gametype = 'EAS'; elseif (stristr($info['hostname'], 'dtas')) $gametype = 'DTAS'; elseif ($info['gametype'] == 'InfilTeamGamePlus') $gametype = 'TDM'; else $gametype = $info['gametype']; $tbl[] = sprintf(' %s
%s:%s %s %s %s ', $s['0'], $s['1'], $info['hostname'], $s['0'], $s['1'], $info['mapname'], $gametype, $numplayers); } $tbl = implode('', $tbl); if (stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml')) $charset = 'application/xhtml+xml; charset=utf-8'; else $charset = 'text/html; charset=utf-8'; header("Content-Type: $charset"); ?> ' ?> Infiltration Servers

Refresh your browser and the list will be refreshed. Click on a link to refresh just that one server (faster).
Unfortunately, the list of players is often incomplete. This is not a bug on my side but one in the UT server. Sometimes trying for a few times can get you a larger list, but often not :(

Infiltration servers
Server Map GameType Players
List fetched on | View source

Back to main