# 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 .= "
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 :(
| Server | Map | GameType | Players |
|---|---|---|---|
| List fetched on | View source | |||