Skip to content
Simple Rcon class for php.
Branch: master
Clone or download
Latest commit ed46208 Sep 22, 2017


Type Name Latest commit message Commit time
Failed to load latest commit information.
src Use literal strings when possible. May 25, 2017
.gitignore Added Composer support. May 24, 2017
LICENSE Initial commit Nov 30, 2013 Small typo fixed Aug 28, 2017


Scrutinizer Code Quality

Simple Rcon class for php.


Using Composer

This Rcon library may be installed by issuing the following command:

$ composer require thedudeguy/rcon

Not Using Composer

If not using Composer, just place the Rcon.php file in your project and include it in your PHP script:



For this script to work, rcon must be enabled on the server, by setting enable-rcon=true in the server's file. A password must also be set, and provided in the script.

$host = ''; // Server host name or IP
$port = 25575;                      // Port rcon is listening on
$password = 'server-rcon-password'; // rcon.password setting set in
$timeout = 3;                       // How long to timeout.

use Thedudeguy\Rcon;

$rcon = new Rcon($host, $port, $password, $timeout);

if ($rcon->connect())
  $rcon->sendCommand("say Hello World!");
You can’t perform that action at this time.