A PHP library for querying game and voice servers
GameQ is a PHP library that allows you to query multiple types of multiplayer game & voice servers at the same time.
This method assumes you already have composer installed and working properly. Add austinb/gameq as a requirement to composer.json by using composer require austinb/gameq:~3.1 or by manually adding the following to the composer.json file in the require section:
"austinb/gameq": "~3.1"
Update your packages with composer update or install with composer install.
Download the latest version of the library and unpack it into your project. Add the following to your bootstrap file:
require_once('/path/to/src/GameQ/Autoloader.php');
The Autoloader.php file provides the same auto loading functionality as the Composer install.
$GameQ = new \GameQ\GameQ();
$GameQ->addServer([
'type' => 'css',
'host' => '127.0.0.1:27015',
]);
$results = $GameQ->process();
For Counter-Strike 2 servers, use 'type' => 'cs2'. CS2 uses the standard Valve A2S query protocol;
the existing 'csgo' type remains compatible. Player details depend on what the server exposes.
Source-based servers allowing unchallenged INFO can still be queried if the preliminary challenge gets no reply. Player and rule queries requiring that token are skipped in this case.
Need more? See the Examples as well as the Documentation.
Please see CONTRIBUTING for details.
See LICENSE for more information