General Notes

gsQuery is a PHP library that allows you to query various game servers for things like number of players, the players itself, current map etc. The main goal of this class is to support as many games as possible. So some game specific thinks cannot be fetched with this class yet.

The current version of gsQuery is 0.1.2. You can get it here. The API documentation and an example is included.

The previous release is 0.1.1. You can get it here.

The unstable version can be downloaded from cvs.terragate.net. You can do this with the CVS command: cvs -d:pserver:anonymous@cvs.terragate.net:/var/lib/cvs co gsQuery or with WinCVS (here is a small howto). You can browse the CVS here.

This library was part of the PHPNuke Gameserver module, but has been seperated from it with version 0.0.4

Please post any suggestions, comments, and bug reports to the gsQuery Forum on this site.

License

This library is free Software. It is licensed under the GNU Lesser General Public License (LGPL).

Supported games

Currently the following games are known to work:

If your game isn't listed here but is based on the same engine as one of the above chances are good that it can be queried with this library. Futhermore you can try it with the gameSpy protocol which many games support.

Requirements

If your provider does not allow UDP traffic but HTTP is allowed (often the case) try out TerraGate's game server query service

Installation

Upload the contents of the src folder to your desired location on your web server (e.g. /gsQuery). You can test gsQuery with the example ( http://mydomain.com/path/to/gsQuery/examples/ ).

Usage

For infos about how to use gsQuery take a look into the API documentation which can be found in the doc directory of the gsQuery package. An example is also included. Alternativly you can use the example and adjust the HTML and CSS to fit your needs.

About the query port

If you want to add a server that is talking the gsqp (Game Server Query Protocol) you have to know the query port for it. Sometimes it can be hard to figure out that. Here is a small overview of games where the query port is known:
Game nameRule
Unreal Tournamentqueryport=gameport+1 (e.g. 7777+1=7778)
Unreal Tournament 200xqueryport=gameport+10 (e.g. 7777+10=7787)
Battlefield 1942Default queryport is 23000 (no rule found yet)
America's Armyqueryport=gameport+1 (e.g. 1716+1=1717)
Ravenshieldqueryport=gameport+1000

In most cases you can use the same query port (or better: the same rule) for games based on the same engine, but not always e.g. Americas Army is based on the UT2003 Engine and is using gameport+1 (1716+1=1717) as the default query port (UT2003 has changed the default query port after the first patch from 7778 to 7787). If you figure out more query ports please let us know about it and post them to the mailing list.

In case of the Halflife (hlife) and the Quake III (q3a) protocol the query port is identicial to the game port.

Donation

You can make a donation for this project to help paying web server costs if you like

Changelog

Changes in 0.1.2:

Changes in 0.1.1:

Changes in 0.1.0:

Changes in 0.0.5:

Changes in 0.0.4: