# PHP_Connect_Rcon **Repository Path**: tianjius/php_connect_rcon ## Basic Information - **Project Name**: PHP_Connect_Rcon - **Description**: 通过PHP连接Minecarft Java服务器的Rcon协议,并且可以向服务器发送指令 - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-06-16 - **Last Updated**: 2024-06-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 欢迎使用 PHP_Connect_Rcon #### 简介 通过PHP连接Minecarft Java服务器的Rcon协议,并且可以向服务器发送指令 #### 使用语言 PHP #### 使用说明 将class.php引入进你的PHP文件,创建一个Rcon对象即可使用 #### 连接示例 ``` //引入class类 include_once("class.php"); $c = new Rcon('Rcon地址',Rcon端口号,'Rcon密码',连接超时时间) ``` #### 可用函数 ``` //sendcommand(发送指令到服务器) $c->sendcimmand('需发送指令'); //close(断开连接) $c->close(); ``` 具体请看test.php文件