https://github.com/et-nik/g-rcon
PHP library for manage game servers and services via RCON protocol
https://github.com/et-nik/g-rcon
counter-strike half-life rcon rcon-client rcon-protocol samp teamspeak3
Last synced: 13 days ago
JSON representation
PHP library for manage game servers and services via RCON protocol
- Host: GitHub
- URL: https://github.com/et-nik/g-rcon
- Owner: et-nik
- Created: 2020-05-09T15:17:54.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-28T18:41:57.000Z (about 4 years ago)
- Last Synced: 2025-04-06T23:39:42.493Z (22 days ago)
- Topics: counter-strike, half-life, rcon, rcon-client, rcon-protocol, samp, teamspeak3
- Language: PHP
- Size: 54.7 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
```bash
composer require knik/g-rcon --no-dev
```## Examples
### EasyGRcon
EasyGRcon is more simpler then GRcon
```php
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
```php
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
```php
$rcon->kick('playername');
$rcon->ban('player');
```### Chat
```php
$rcon->sendMessage('Hello players!');
```