1. Go to this page and download the library: Download gries/rcon library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gries / rcon example snippets
use gries\Rcon\MessengerFactory;
use gries\Rcon\Messenger;
te('example.com', 25575, 'mypass');
// send a simple message
$response = $messenger->send('list');
echo $response; // a,b,c
// send a message and parse the command via. a callable
$response = $messenger->send('list', function($arg) {
return explode(',', $arg);
});
print_r($response); // ['a', 'b', 'c']
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.