Skip to content
This repository was archived by the owner on Jun 15, 2025. It is now read-only.

INFOMCPE/PHP-Minecraft-Rcon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

PHP-Minecraft-Rcon

Simple Rcon class for php.

Connection is established over TCP.

Examples

For this script to work, rcon must be enabled on the server, by setting enable-rcon=true in the server's server.properties file. A password must also be set, and provided in the script.

require_once('rcon.php');

$host = 'some.minecraftserver.com'; // Server host name or IP
$port = 25567;                      // Port rcon is listening on
$password = 'server-rcon-password'; // rcon.password setting set in server.properties
$timeout = 3;                       // How long to timeout.

$rcon = new Rcon($host, $port, $password, $timeout);

if ($rcon->connect())
{
  $rcon->sendCommand("say Hello World!");
}

About

Simple Rcon class for php.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%