PHPackages                             dsg/postscriptum-rcon-php - 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. dsg/postscriptum-rcon-php

AbandonedArchivedLibrary

dsg/postscriptum-rcon-php
=========================

Post Scriptum Server RCON library

0.1.0(5y ago)126[2 PRs](https://github.com/Deutsche-Squad-Gemeinschaft/PostScriptum-RCON-PHP/pulls)MITPHP

Since Dec 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Deutsche-Squad-Gemeinschaft/PostScriptum-RCON-PHP)[ Packagist](https://packagist.org/packages/dsg/postscriptum-rcon-php)[ RSS](/packages/dsg-postscriptum-rcon-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

 [![Post Scriptum RCON PHP Logo](https://raw.githubusercontent.com/Deutsche-Squad-Gemeinschaft/PostScriptum-RCON-PHP/master/logo.svg)](https://raw.githubusercontent.com/Deutsche-Squad-Gemeinschaft/PostScriptum-RCON-PHP/master/logo.svg)

Post Scriptum RCON PHP
======================

[](#post-scriptum-rcon-php)

 **PHP Wrapper for Post Scriptum RCON Commands**

---

 [ ![Deutsche Squad Gemeinschaft](https://github.com/Deutsche-Squad-Gemeinschaft/PostScriptum-RCON-PHP/workflows/CI/badge.svg) ](https://github.com/Deutsche-Squad-Gemeinschaft/PostScriptum-RCON-PHP/actions) [ ![Deutsche Squad Gemeinschaft](https://camo.githubusercontent.com/82c3af535373b53f1d9418b674c95f0c914d819378fe0eac92c0e2ec3c2a6054/68747470733a2f2f636f6465636f762e696f2f67682f44657574736368652d53717561642d47656d65696e7363686166742f506f7374536372697074756d2d52434f4e2d5048502f6272616e63682f6d61737465722f67726170682f62616467652e737667) ](https://codecov.io/gh/Deutsche-Squad-Gemeinschaft/PostScriptum-RCON-PHP) [ ![Total Downloads](https://camo.githubusercontent.com/87281fb04f00a5d075e9c3a15c6d4d268d63b1471eb5db95a0e547f8e81b30f5/68747470733a2f2f706f7365722e707567782e6f72672f6473672f706f7374736372697074756d2d72636f6e2d7068702f646f776e6c6f6164732e706e67) ](https://packagist.org/packages/dsg/postscriptum-rcon-php) [ ![Latest Stable Version](https://camo.githubusercontent.com/b620bb515a735da278e343ce4ecdde808fd19c0eb84104ad6bb64d91569a746b/68747470733a2f2f706f7365722e707567782e6f72672f6473672f706f7374736372697074756d2d72636f6e2d7068702f762f737461626c65) ](https://packagist.org/packages/dsg/postscriptum-rcon-php) [ ![Latest Unstable Version](https://camo.githubusercontent.com/f8f2296795796b9d289def95ca4094e98e92396ebbdbbb0a9164238a136a8304/68747470733a2f2f706f7365722e707567782e6f72672f6473672f706f7374736372697074756d2d72636f6e2d7068702f762f756e737461626c65) ](https://packagist.org/packages/dsg/postscriptum-rcon-php) [ ![License](https://camo.githubusercontent.com/95d8c895c2cb3f08c942afe1025818ee78fc527317338dd6eb9f742564d632ab/68747470733a2f2f706f7365722e707567782e6f72672f6473672f706f7374736372697074756d2d72636f6e2d7068702f6c6963656e7365) ](https://packagist.org/packages/dsg/postscriptum-rcon-php)
 [ ![Deutsche Squad Gemeinschaft](https://raw.githubusercontent.com/Deutsche-Squad-Gemeinschaft/battlemetrics-php/master/dsg-badge.svg) ](https://dsg-gaming.de) [ ![Discord](https://camo.githubusercontent.com/72a9c5ed48d13e8627ab2fd07e55bb22f6423fb3186c0f875f43765656c8a169/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3236363231303232333430363937323932382e7376673f7374796c653d666c61742d737175617265266c6f676f3d646973636f7264) ](https://discord.gg/9F2Ng5C)

Join the Squad RCON Community
-----------------------------

[](#join-the-squad-rcon-community)

If you have any questions or need help with getting started with RCON in OWI games you should make sure to join the [Squad RCON Community on Discord](https://discord.gg/9F2Ng5C).

Installation
------------

[](#installation)

You can install this package by using composer and the following command:

```
composer require dsg/postscriptum-rcon-php

```

The code will then be available under the `DSG\PostScriptumRCON` namespace.

Commands
--------

[](#commands)

- ListPlayers
- AdminListDisconnectedPlayers
- ShowNextMap
- AdminKick "&lt;NameOrSteamId&gt;" &lt;KickReason&gt;
- AdminKickById &lt;PlayerId&gt; &lt;KickReason&gt;
- AdminBan "&lt;NameOrSteamId&gt;" "&lt;BanLength&gt;" &lt;BanReason&gt;
- AdminBanById &lt;PlayerId&gt; "&lt;BanLength&gt;" &lt;BanReason&gt;
- AdminBroadcast &lt;Message&gt;
- AdminRestartMatch
- AdminEndMatch
- AdminChangeMap &lt;MapName&gt;
- AdminSetNextMap &lt;MapName&gt;
- AdminSetMaxNumPlayers &lt;NumPlayers&gt;
- AdminSetServerPassword &lt;Password&gt;
- AdminForceTeamChange &lt;NameOrSteamId&gt;
- AdminForceTeamChangeById &lt;PlayerId&gt;
- AdminDemoteCommander &lt;PlayerName&gt;
- AdminDemoteCommanderById &lt;PlayerId&gt;
- AdminDisbandSquad &lt;TeamId&gt; &lt;SquadId&gt;
- AdminRemovePlayerFromSquad &lt;PlayerName&gt;
- AdminRemovePlayerFromSquadById &lt;PlayerId&gt;
- AdminWarn &lt;NameOrSteamId&gt; &lt;WarnReason&gt;
- AdminWarnById &lt;PlayerId&gt; &lt;WarnReason&gt;

USAGE
-----

[](#usage)

### Create an instance

[](#create-an-instance)

Instanciate the PostScriptumServer class to open a new RCON connection. This will throw an Exception if no connection can be made.

```
use DSG\PostScriptumRCON\PostScriptumServer;

...

/** @var PostScriptumServer */
$server = new PostScriptumServer(new ServerConnectionInfo('127.0.0.1', 21114, 'YourRconPassword'));
```

### ListPlayers

[](#listplayers)

Get the current Player list using the ListPlayers command. This does not include disconnected players.

```
/** @var Player[] */
$players = $server->listPlayers();
```

### Get disconnected Players

[](#get-disconnected-players)

Get disconnected players using the ListPlayers command.

```
/** @var Player[] */
$players = $server->listDisconnectedPlayers();
```

### AdminKick

[](#adminkick)

Kick a player by name, SteamId or ingame id.

```
/** @var bool */
$success = $server->adminKick('76561197960287930', 'Reason');

// or

/** @var bool */
$success = $server->adminKickById($player->getId(), 'Reason');
```

### AdminBan

[](#adminban)

Ban a player by name, SteamId or ingame id.

```
/** @var bool */
$success = $server->adminBan('76561197960287930', '1h', 'Reason');

// or

/** @var bool */
$success = $server->adminBanById($player->getId(), '1h', 'Reason');
```

### Get the current map

[](#get-the-current-map)

Get the current map using the ShowNextMap command

```
/** @var string */
$map = $server->currentMap();
```

### Get the next map

[](#get-the-next-map)

Get the next map using the ShowNextMap command

```
/** @var string */
$map = $server->nextMap();
```

### AdminRestartMatch

[](#adminrestartmatch)

Restart the current match

```
/** @var bool */
$success = $server->adminRestartMatch();
```

### AdminEndMatch

[](#adminendmatch)

End the current match

```
/** @var bool */
$success = $server->adminEndMatch();
```

### AdminBroadcast

[](#adminbroadcast)

Broadcast message to all players on the server

```
/** @var bool */
$success = $server->adminBroadcast('Hello from the other side');
```

### AdminChangeMap

[](#adminchangemap)

Set the next map and end the current game immediately.

```
/** @var bool */
$success = $server->adminChangeMap('Sumari AAS v1');
```

### AdminSetNextMap

[](#adminsetnextmap)

Sets next map

```
/** @var bool */
$success = $server->adminSetNextMap('Sumari AAS v1');
```

### AdminSetMaxNumPlayers

[](#adminsetmaxnumplayers)

Set the maximum amount of players / slots

```
/** @var bool */
$success = $server->adminSetMaxNumPlayers(80);
```

### AdminSetServerPassword

[](#adminsetserverpassword)

Set the server password

```
/** @var bool */
$success = $server->adminSetServerPassword('secret');
```

### AdminForceTeamChange

[](#adminforceteamchange)

Forces a player to the opposite team by providing the name or steamid.

```
/** @var bool */
$success = $server->adminForceTeamChange('Name or SteamId');
```

### AdminForceTeamChangeById

[](#adminforceteamchangebyid)

Forces a player to the opposite team by providing the ingame Player id.

```
/** @var bool */
$success = $server->adminForceTeamChangeById($player->getId());
```

### AdminDisbandSquad command.

[](#admindisbandsquad-command)

Disbands a Squad by providing the Team id / index &amp; Squad id / index.

```
/** @var bool */
$success = $server->adminDisbandSquad($team->getId(), $squad->getId());
```

### AdminRemovePlayerFromSquad

[](#adminremoveplayerfromsquad)

Removes a Player from his Squad by providing the Player name.

```
/** @var bool */
$success = $server->adminRemovePlayerFromSquad('Name');
```

### AdminRemovePlayerFromSquadById

[](#adminremoveplayerfromsquadbyid)

Removes a player from his Squad by providing the ingame Player id.

```
/** @var bool */
$success = $server->adminRemovePlayerFromSquadById($player->getId());
```

### AdminWarn

[](#adminwarn)

Warns a Player by providing his name / steamid and a message.

```
/** @var bool */
$success = $server->adminWarn('Name or SteamId', 'Warn Reason');
```

### AdminWarnById

[](#adminwarnbyid)

Warns a Player by id.

```
/** @var bool */
$success = $server->adminWarnById($player->getId(), 'Warn Reason');
```

Important Note
--------------

[](#important-note)

Make sure to always close the connection manually or trigger a disconnect by destructing the object to preventt blocking the RCON server by using up it'S available connections.

```
$server->disconnect();
// Or
unset($server);
```

Special Thanks
--------------

[](#special-thanks)

- [SquadSlovenia](https://github.com/SquadSlovenia) (Intial creators)
- [Brozowski](https://github.com/Brozowski) (Major contributor)
- \[ToG\] subtlerod (Major contributions to the used SquadRcon implementation)
- [Thomas Smyth](https://github.com/Thomas-Smyth/SquadJS) (Creator of SquadJS, a great resource for Squad RCON).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.7% 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

1976d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/509a5baf8d7d8f7ae8c5b569ee81b1d04ed6af1af625696777e51e997ff9a685?d=identicon)[bumbummen99](/maintainers/bumbummen99)

---

Top Contributors

[![bumbummen99](https://avatars.githubusercontent.com/u/4533331?v=4)](https://github.com/bumbummen99 "bumbummen99 (24 commits)")[![SquadSlovenia](https://avatars.githubusercontent.com/u/23271091?v=4)](https://github.com/SquadSlovenia "SquadSlovenia (6 commits)")[![Brozowski](https://avatars.githubusercontent.com/u/15922579?v=4)](https://github.com/Brozowski "Brozowski (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dsg-postscriptum-rcon-php/health.svg)

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

PHPackages © 2026

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