preussio/gameserver
Composer 安装命令:
composer require preussio/gameserver
包简介
This is a SDK to manage a game server connected with ssh.
README 文档
README
Installation
To install this package, please enter the following command:
composer require preussio/gameserver
Examples
Here is an example of how to use the interfaces:
<?php
require_once __DIR__.'/vendor/autoload.php';
use PreussIO\Gameserver\Gameserver;
$gameserver = new Gameserver("example.com", [
'username' => 'username',
'password' => 'password',
]);
// Checks if an game server is running.
if($gameserver->isRunning()) {
echo "Server is running.";
} else {
echo "Server is not running.";
}
// Starts an game server.
$gameserver->start();
// Stops an game server.
$gameserver->stop();
// Sends a command to the game server.
$gameserver->sendCommand('say Hello World!');
// Display the log of the game server.
$lines = $gameserver->getConsole();
foreach ($lines as $line) {
echo $line;
}
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2017-03-26