https://github.com/emansom/retrorcon-php
PSR-4 compliant PHP library to communicate with emulators adhering to the RetroRCON standard
https://github.com/emansom/retrorcon-php
grpc grpc-php habbo protobuf protobuf3 psr4 rcon retro
Last synced: 2 months ago
JSON representation
PSR-4 compliant PHP library to communicate with emulators adhering to the RetroRCON standard
- Host: GitHub
- URL: https://github.com/emansom/retrorcon-php
- Owner: emansom
- License: agpl-3.0
- Created: 2018-06-11T10:48:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-17T13:35:37.000Z (almost 8 years ago)
- Last Synced: 2025-05-20T23:49:31.283Z (10 months ago)
- Topics: grpc, grpc-php, habbo, protobuf, protobuf3, psr4, rcon, retro
- Language: PHP
- Homepage:
- Size: 35.2 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://packagist.org/packages/ewout/retrorcon)
[](https://packagist.org/packages/ewout/retrorcon)
# retrorcon-php
This PHP library is used to get information such as users online, refreshing users' look and doing housekeeping activity such as e.g. sending room alerts by communicating with emulators adhering to the [RetroRCON](https://github.com/emansom/retrorcon) standard.
The project requires PHP 7.2 or higher and uses composer's autoloader following the PSR-4 standard.
## How to use it
1. [Install](https://grpc.io/docs/quickstart/php.html#install-the-grpc-php-extension) and [configure](https://grpc.io/docs/quickstart/php.html#update-phpini) the PHP gRPC extension
2. [Install](https://grpc.io/docs/quickstart/php.html#1-c-implementation-for-better-performance) and [configure](https://grpc.io/docs/quickstart/php.html#1-c-implementation-for-better-performance) the PHP Protobuf extension
3. [Install](https://getcomposer.org/doc/00-intro.md) and [learn](https://getcomposer.org/doc/01-basic-usage.md) how to use [composer](https://getcomposer.org/)
3. Add [the composer package](https://packagist.org/packages/ewout/retrorcon) to your project by running `composer require ewout/retrorcon`
2. Make sure to include [composer's autoloader](https://getcomposer.org/doc/01-basic-usage.md#autoloading)
3. Look at the snippet below on how to use the library
## Usage
```php
'127.0.0.1',
'port' => 12309
]
);
// Get online user count
$onlineCount = $rcon->getOnlineCount();
// Is user 'Ewout' online?
$isOnline = $rcon->isUserOnline("Ewout");
// Supports user ID too
$userId = 1;
$isOnline = $rcon->isUserOnline($userId);
// Refresh user figure if online (only meant to be used when figure/motto changed)
if ($isOnline) {
$rcon->refreshLook($userId);
}
```