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', '192.168.0.1', '27015');
First Draft: 2004-03-16
- Proposal: 2004-03-16
- Call for Votes: 2004-04-01
Aidan ListerI've made the suggested changes to the proposal, and listed possible future extensions.
[2004-03-16 11:58 UTC]
Aidan ListerI've added support for another 15 game types, and made some small changes to the code base.
[2004-03-17 10:19 UTC]
The implementation of the class is now in query.php (.phps), rather than the index page.
Aidan ListerI've made _massive_ changes to the entire package.
[2004-03-19 15:51 UTC]
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 ListerI've moved onto dotgeek hosting, the link should be stable now.
[2004-03-22 12:12 UTC]
Thanks to David Costa