PHPackages                             rminks/rcon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rminks/rcon

ActivePackage[Utility &amp; Helpers](/categories/utility)

rminks/rcon
===========

Source RCON Protocol library for laravel

v1.0.0(2y ago)0211[1 PRs](https://github.com/RMinksCss/Laravel-Rcon-Protocol/pulls)MITPHP

Since Apr 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/RMinksCss/Laravel-Rcon-Protocol)[ Packagist](https://packagist.org/packages/rminks/rcon)[ RSS](/packages/rminks-rcon/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

About
=====

[](#about)

All credits to AnvilM ([https://github.com/AnvilM/PHP\_RCON/tree/main](https://github.com/AnvilM/PHP_RCON/tree/main)), I upload my own version according to my own requirements, preferences and needs.

Source RCON Protocol library for Laravel

Install
-------

[](#install)

You can get this package using composer

```
composer require rminks/rcon
```

Configuration
-------------

[](#configuration)

### Setting in valve games (Engine Source)

[](#setting-in-valve-games-engine-source)

By default, SRCDS listens for RCON connections on TCP port 27015. If the server's port number is changed using the -port option, the RCON port will change as well. SRCDS will always refuse any RCON connection attempt originating from an IP on its banlist. If the rcon\_password cvar is written to for any reason, the server will immediately close all authenticated RCON connections. This happens even if the new value of rcon\_password is identical to the old one. These connections will need to be re-opened and re-authenticated before any further commands can be issued. Connections which have not been authenticated yet are not dropped. If the password was changed remotely, the server will not respond to the command which caused the password to change. if rcon\_password is not setted, the gameserver gonna reject all connections

### Setting in Minecraft

[](#setting-in-minecraft)

To use RCON on your server, you need to enable it and configure it in your Minecraft server settings.

In the file server.properties

```
rcon.port=25575
enable-rcon=true
rcon.password=123
```

Getting started
===============

[](#getting-started)

Create connection
-----------------

[](#create-connection)

To create an RCON connection to a minecraft server, you need to create an object of the RCON class.

```
use RMinks\RCON\RCON;

$Ip = '127.0.0.1'; //Server IP
$Port = 25575; //RCON port
$Password = '123'; //RCON password
$Timeout = 30; //Timeout in ms

$RCON = new RCON($Ip, $Port, $Password, $Timeout);
```

Send commands
-------------

[](#send-commands)

To send a command to the server, use this method of the RСON class. This method will return the response from the server.

```
use RMinks\RCON\RCON;

...

$RCON->sendCommand('map de_dust2');//Example for CS:S
$RCON->sendCommand('time set day');//Example for Minecraft
```

Server Responses
----------------

[](#server-responses)

### All responses

[](#all-responses)

To get all responses from the server use the following method

```
use RMinks\RCON\RCON;

...

$Response = $RCON->ResponseService->getAllResponses();
```

### Last response

[](#last-response)

To get last response from the server use the following method

```
use RMinks\RCON\RCON;

...

$Response = $RCON->ResponseService->getLastResponse();
```

### Response by id

[](#response-by-id)

You can get a specific server response from a list if you have the ID of that response.

```
use RMinks\RCON\RCON;

...

$Response = $RCON->ResponseService->getResponse(3);
```

Example
-------

[](#example)

```
namespace App\Http\Controllers;

use RMinks\RCON\RCON;

class RCONController extends Controller
{
    public function setDay()
    {
        $Ip = '127.0.0.1'; //Server IP
        $Port = 25575; //RCON port
        $Password = '123'; //RCON password
        $Timeout = 30; //Timeout in ms

        $RCON = new RCON($Ip, $Port, $Password, $Timeout); //Create connection

        $RCON->sendCommand('time set day'); //Send command

        $Response = $RCON->ResponseService->getLastResponse(); //Get last response

        echo $Response;
    }
}
```

As a result of executing this code you should get the following result

```
    Set the time to 1000

```

Example 2
---------

[](#example-2)

```
namespace App\Http\Controllers;

use RMinks\RCON\RCON;

class RCONController extends Controller
{
    public function changeMap()
    {
        $Ip = '192.168.1.39'; //Server IP
        $Port = 27015; //RCON port
        $Password = '12345'; //RCON password
        $Timeout = 30; //Timeout in ms

        $RCON = new RCON($Ip, $Port, $Password, $Timeout); //Create connection

        $RCON->sendCommand('map de_dust2'); //Send command

        $Response = $RCON->ResponseService->getLastResponse(); //Get last response

        echo $Response;
        dd($Response);//For debug
    }
}
```

As a result of executing this code you should get the following result

```
    rcon from "x.x.x.x:xxxx": command "map de_dust2"

    L dd/mm/yyyy - hr:m:s: -------- Mapchange to de_dust2 --------

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

803d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24411823?v=4)[rminks](/maintainers/rminks)[@rminks](https://github.com/rminks)

---

Top Contributors

[![RMinksCpp](https://avatars.githubusercontent.com/u/78633563?v=4)](https://github.com/RMinksCpp "RMinksCpp (2 commits)")

---

Tags

sourceminecraftrconvalve

### Embed Badge

![Health badge](/badges/rminks-rcon/health.svg)

```
[![Health](https://phpackages.com/badges/rminks-rcon/health.svg)](https://phpackages.com/packages/rminks-rcon)
```

###  Alternatives

[thedudeguy/rcon

Simple Rcon class for php.

16164.1k1](/packages/thedudeguy-rcon)[xpaw/php-minecraft-query

PHP library to query Minecraft servers

747107.4k3](/packages/xpaw-php-minecraft-query)[spirit55555/php-minecraft

Useful PHP classes for Minecraft

6826.2k](/packages/spirit55555-php-minecraft)[d3strukt0r/votifier-client

Simple Tool to send vote request to a server which has the Votifier plugin.

1624.5k](/packages/d3strukt0r-votifier-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
