gries/rcon

PHP RCON 客户端

0.0.3 2015-06-07 11:23 UTC

This package is auto-updated.

Last update: 2024-09-16 22:00:27 UTC


README

这是一个简单的php RCON客户端。

SensioLabsInsight

Build Status Code Quality

安装

可以通过Composer安装RCON。

composer require "gries/rcon"

用法

use gries\Rcon\MessengerFactory;
use gries\Rcon\Messenger;

require_once __DIR__.'/vendor/autoload.php';

// setup the messenger
$messenger = MessengerFactory::create('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']

运行测试

vendor/bin/phpspec run

贡献!

请通过github issues提供反馈/功能请求/错误报告。或者直接发送pull request :)

作者

许可证

有关完整的版权和许可信息,请查看与源代码一起分发的LICENSE文件。