百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

PHP-Minecraft-Server-Status-Query

> 编程语言
开源

Minecraft 服务器状态查询,使用 PHP 编写,包含在线玩家、MOTD、收藏图标等与服务器相关的信息,无需插件和启用查询。

186 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Minecraft 服务器状态查询,使用 PHP 编写,包含在线玩家、MOTD、收藏图标等与服务器相关的信息,无需插件和启用查询。

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

composer require funnyitselmo/minecraftserverstatus

Tutorial

use MinecraftServerStatus\MinecraftServerStatus;

require '../vendor/autoload.php';

$response = MinecraftServerStatus::query('lostforce.com', 25565);

if (! $response) {
    echo "The Server is offline!";
} else {
    echo " 

		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.

Variables

The following table contains the available variables the response can contain. The default value of each variable is false.

Array Index Description

'hostname' Exact server address in 127.0.0.1 format

'port' The servers port for example 25565

'ping' The time in ms the server needs to answer

'version' The server version (for example: 1.9)

'protocol' The server protocol (for example: 107)

'players' Amount of players who are currently online

'max_players' Number of the slots of the server

'description' The message of the day of the server

'description_raw' The raw version of description (contains color codes etc.)

'favicon' The favicon of the server in a base64 string (Can be displayed with the html img tag by setting the string as src)

'modinfo' Informations about the plugins

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHP

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言