在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):spravil/PHP-Minecraft-Server-Status-Query开源软件地址(OpenSource Url):https://github.com/spravil/PHP-Minecraft-Server-Status-Query开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):Minecraft Server Status Query [Discontinued]Minecraft Server Status Query, written in PHP, with online players, motd, favicon and more server related informations without plugins and enable-query. Tested with Spigot 1.9 and Bungeecord 1.9 & 1.8 Installation
Tutorialuse MinecraftServerStatus\MinecraftServerStatus;
require '../vendor/autoload.php';
$response = MinecraftServerStatus::query('lostforce.com', 25565);
if (! $response) {
echo "The Server is offline!";
} else {
echo "<img width=\"64\" height=\"64\" src=\"" . $response['favicon'] . "\" /> <br>
The Server " . $response['hostname'] . " is running on " . $response['version'] . " and is online,
currently are " . $response['players'] . " players online
of a maximum of " . $response['max_players'] . ". The motd of the server is '" . $response['description'] . "'.
The server has a ping of " . $response['ping'] . " milliseconds.";
} If the server is offline MinecraftServerStatus::query returns false else it returns an array which contains the server informations. VariablesThe following table contains the available variables the response can contain. The default value of each variable is false.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论