HaloStatus is a script for displaying real-time game information from Halo PC and Halo CE (Custom Edition) servers on a website.
Simply copy the files from this directory to the desired path on your webserver. No configuration required.
To link to a specific server, you can add a hash to the URL. For example: https://example.com/halostatus/#s=46.249.47.12:2332
If you wish to restrict which game servers can be queried, open ajax.php and set USE_WHITELIST to true. You should then add your server's IP and port information to the list of whitelisted servers. Optionally, comment out the New Query button from index.html.
To force the page to display an initial server without having the information added to the URL, open index.html and set const forceLoad = false; to true. The default information on the following line should be set to match your desired server's IP and port.
If you wish to make changes to the Javascript, ensure you either uncomment out the individual files in index.html or update the everything-min.js file.
Some of the PSDs used to create the assets for the script can be found in psds.zip. If you wish to create new map images, use the template provided in mapinfotemplate.psd.
This script is released under the MIT licence.
PHP 5+ with socket support enabled. See troubleshooting for further information.
It's likely that one or more of the socket functions have been disabled by the server administrator. If you are the administrator, you can view a list of disabled functions in your php.ini file under disable_functions.
To work around this problem, see below to enable legacy functionality.
You can enable legacy functionality that works in a similar fashion to older query scripts.
To do this, open script/ajax.php and change the following line:
$query = new QueryServer($buffer, $_POST['ip'], (int) $_POST['port']);to:
$query = new QueryServer($buffer, $_POST['ip'], (int) $_POST['port'], null, 1);It should be noted that this functionality is extremely slow as it will take the length of the specified timeout (default two seconds) to return a response. To lower the timeout, change the fourth argument to a suitable value (one second recommended for legacy functionality):
$query = new QueryServer($buffer, $_POST['ip'], (int) $_POST['port'], 1, 1);It's possible that your server's configuration is blocking outbound and/or inbound data. Due to the nature of UDP, you will not receive any 'unable to connect' errors.
It's possible that the route between your server and the game server is experiencing high packet loss or high latency. If high latency is a persistent issue with your server, you can adjust the script's timeout.
To do this, open script/ajax.php and change the following line:
$query = new QueryServer($buffer, $_POST['ip'], (int) $_POST['port']);to:
$query = new QueryServer($buffer, $_POST['ip'], (int) $_POST['port'], 5);The above example sets a 5 second timeout.
In script/ajax.php, $buffer will contain the raw server response.
Sorry/oops (delete as appropriate). Please open a GitHub issue and I'll see what I can do.
Using the default settings, this script will require around 250 bytes/sec (<1MB an hour) from a full server and around 150 bytes/sec from an empty server. This transfer rate should have a negligible impact on the server.
A little more demand is placed on web server due to the data being decoded from flags to strings and HTTP overhead but it's still only around 1KB/sec (guesstimate) for a full server.
If you deem this bandwidth usage to be too great, you can reduce the usage by editing the index.html file to decrease the polling rate.
In no particular order:
For his work in decoding the game flags back in 2003.
For his work in building the Perl flags decoder which I used as the basis of the PHP flags decoder (FlagsDecoder.class.php).
http://cpansearch.perl.org/src/LINK/Net-Halo-Status-0.02/lib/Net/Halo/Status.pm
http://www.schillmania.com/projects/soundmanager2/
License: BSD license
Silk icon set author.
http://www.famfamfam.com/lab/icons/silk/
License: Creative Commons Attribution 2.5 License.
License: GPL or MIT License
License: GPL or MIT License
License: GPL or MIT License
Server icon (server.png)
http://www.everaldo.com/crystal/
License: LGPL
http://doomcmyk.deviantart.com
Sound assets from Halo 1.
Game type icons from Bungie.net.

