Snippets from the gQuery txt file:<<>>
gQuery// is a game server query tool for PHP. It works in many ways
in the same manner as qStat but by using PHP instead of C it allows
much easyer intergration into the web along with overall flexibility.
It currently only supports Quake2, Quake3, Half-Life and Unreal
Tournament but I plan to support almost all games that support this
feature.<<
To use this, first I have to put the gQuery.php where appropriate to put class files in your web structure.<< Where is this?
Then I need to include the gQuery.php file.
require("/gQuery/gQuery.php");<<
Then make a new instance of it.
Port is not needed if default port is being used but it is highly reccomended.
$gameinfo = new gQuery("Q2", "skjalfti4.simnet.is", "27910");<<
The script has now retreived all the info from the server. The info
is available in 2 arrays called systeminfo and playerinfo. To retreive info from the array use for example: echo $gameinfo->serverinfo["name"];
to retreive the name of the server. If error has occured the value
of this string will be "Error connecting to server".<<
You might also find the command
$gameinfo->debug();
to be useful while setting up the scripts or if errors occur.<<
The serverinfo commands that there should always be available no
matter what gametype is being run are: name, address, map, players,
maxplayers, moddir and version.<<
Does this make sense to anyone? I am having a hard time understanding this as I am not a programmer type. If someone has used this before and can step by step me through it, it would be greatly appreciated.