knik/g-rcon

RCON Library for game servers management

Maintainers

👁 knik

Package info

github.com/et-nik/g-rcon

pkg:composer/knik/g-rcon

Statistics

Installs: 3 578

Dependents: 1

Suggesters: 0

Stars: 4

Open Issues: 1

0.7.0 2021-02-28 18:39 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 0070bb791471d7529f576f7bff5e5a79c376e6b1

  • Nikita Kuznetsov <nikita.hldm.woop@gmail.com>

rconteamspeakcounter-strikeSAMPhalf-life

This package is auto-updated.

Last update: 2026-06-29 01:21:16 UTC


README

GRcon is a PHP library for manage game servers and services using RCON protocol.

Supported protocols

  • Source (CS Global Offensive, Team Fortress 2, Black Mesa)
  • GoldSource (CS 1.6, Half-Life game servers, etc.)
  • Minecraft
  • TeamSpeak 3
  • SAMP (GTA San-Andreas Multiplayer)
  • Rust

Comming soon

  • Arma

Installation

composer require knik/g-rcon --no-dev

Examples

EasyGRcon

EasyGRcon is more simpler then GRcon

include "../vendor/autoload.php";

use Knik\GRcon\EasyGRcon;

$rcon = new EasyGRcon('source', [
 'host' => '127.0.0.1',
 'port' => 27015,
 'password' => 'rC0nPaS$word'
]);

$rcon->execute('changelevel de_dust2');
$rcon->execute('kick player');

GRcon

GRcon is more flexible and configurable

use Knik\GRcon\GRcon;
use Knik\GRcon\Protocols\SourceAdapter;

$adapter = new SourceAdapter([
 'host' => '127.0.0.1',
 'port' => 27015,
 'password' => 'rC0nPaS$word',
]);

$rcon = new GRcon($adapter);

$rcon->execute('changelevel de_dust2');
$rcon->execute('kick player');

Players manage

$rcon->kick('playername');
$rcon->ban('player');

Chat

$rcon->sendMessage('Hello players!');