Proposal for "Net_GameServerQuery"

» Metadata » Status
» Description
This package allows you to easily retreive information from any Game Server.

- Built in support for over 20 games

Access this information via a result object:
ping() -- ping of server
players() -- the players in the server, frags, time in game
status() -- map, players, maxplayers, mod, passworded
rules() -- list of rules on the server
raw() -- the complete array of information sent from the server

This package is functional, but in alpha. The API, and indeed the entire framework are likely to change.

Simple usage example:
$gsq = new Net_GameServerQuery;
$servera = $gsq->query('halflife', '', '27015');

print $servera->ping();
print_r ($servera->status());
» Dependencies » Links
» Timeline » Changelog
  • First Draft: 2004-03-16
  • Proposal: 2004-03-16
  • Call for Votes: 2004-04-01
  • Aidan Lister
    [2004-03-16 11:58 UTC]

    I've made the suggested changes to the proposal, and listed possible future extensions.
  • Aidan Lister
    [2004-03-17 10:19 UTC]

    I've added support for another 15 game types, and made some small changes to the code base.

    The implementation of the class is now in query.php (.phps), rather than the index page.
  • Aidan Lister
    [2004-03-19 15:51 UTC]

    I've made _massive_ changes to the entire package.

    In a stroke of genious, I decided to return a result object from a successful query(). This solves all problems associated with quering multiple servers and restrictive (poor) API behaviour.

    The second major change was to the protocol handler. (Another stroke of genious).

    Instead of constants (which lead to numerous problems adding new protocols, and testing for validity), there is a seperate file (protocol.php) with an array of supported games, and protocol used. In a seperate array, the details for each protocol as used by the class.

    This makes the game protocol independent (protocol is not required to be known by the end user) and allows additions of new protocols and games by editing an array. I'm very happy with the end result.

    I've reworded the package description, and changed links to the source files.
    The package is still in heavy development, so hold off on the reviews until I've stabilised it.
  • Aidan Lister
    [2004-03-22 12:12 UTC]

    I've moved onto dotgeek hosting, the link should be stable now.

    Thanks to David Costa