All Projects → noxifoxi → Minecraft Server Status

noxifoxi / Minecraft Server Status

Licence: gpl-3.0
Minecraft server status and -info script for PHP

Projects that are alternatives of or similar to Minecraft Server Status

Minestom
1.16.5 Lightweight and multi-threaded Minecraft server
Stars: ✭ 400 (+925.64%)
Mutual labels:  minecraft, minecraft-server
Shopchest
ShopChest - Spigot/Bukkit Plugin
Stars: ✭ 38 (-2.56%)
Mutual labels:  minecraft, minecraft-server
Mohist
Minecraft Forge Hybrid server implementing the Paper/Spigot/Bukkit API, formerly known as Thermos/Cauldron/MCPC+
Stars: ✭ 489 (+1153.85%)
Mutual labels:  minecraft, minecraft-server
Flying Squid
Create Minecraft servers with a powerful, stable, and high level JavaScript API.
Stars: ✭ 311 (+697.44%)
Mutual labels:  minecraft, minecraft-server
Nodemc
Meta repository for information on the project as a whole
Stars: ✭ 16 (-58.97%)
Mutual labels:  minecraft, minecraft-server
Paper
High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies
Stars: ✭ 5,293 (+13471.79%)
Mutual labels:  minecraft, minecraft-server
Minecase
Minecraft server based on Orleans
Stars: ✭ 581 (+1389.74%)
Mutual labels:  minecraft, minecraft-server
minecraft-lambda-function
AWS Lambda function for managing Minecraft server
Stars: ✭ 37 (-5.13%)
Mutual labels:  minecraft, minecraft-server
Mcsmanager
轻量级,开箱即用,多实例和支持 Docker 的 Minecraft 服务端管理面板
Stars: ✭ 829 (+2025.64%)
Mutual labels:  minecraft, minecraft-server
Nukkit
Cloudburst Nukkit - Nuclear-Powered Minecraft: Bedrock Edition Server Software
Stars: ✭ 776 (+1889.74%)
Mutual labels:  minecraft, minecraft-server
Purpur
Purpur is a fork of Paper, Tuinity, and Airplane with the goal of providing new and interesting configuration options, which allow for creating a unique gameplay experience not seen anywhere else
Stars: ✭ 286 (+633.33%)
Mutual labels:  minecraft, minecraft-server
Drivebackupv2
Uploads Minecraft backups to Google Drive/OneDrive or by (S)FTP
Stars: ✭ 26 (-33.33%)
Mutual labels:  minecraft, minecraft-server
Arclight
A Bukkit(1.15/1.16) server implementation on Forge using Mixin. ⚡
Stars: ✭ 262 (+571.79%)
Mutual labels:  minecraft, minecraft-server
Gdlauncher
GDLauncher is a simple, yet powerful Minecraft custom launcher with a strong focus on the user experience
Stars: ✭ 386 (+889.74%)
Mutual labels:  minecraft, minecraft-server
PyMine
Minecraft Server in Python
Stars: ✭ 12 (-69.23%)
Mutual labels:  minecraft, minecraft-server
Tuinity
Stars: ✭ 531 (+1261.54%)
Mutual labels:  minecraft, minecraft-server
Gomint
GoMint is a modern Minecraft Bedrock Edition server enabling you to make your visions come true
Stars: ✭ 208 (+433.33%)
Mutual labels:  minecraft, minecraft-server
Sponge
The SpongeAPI implementation targeting vanilla Minecraft and 3rd party platforms.
Stars: ✭ 241 (+517.95%)
Mutual labels:  minecraft, minecraft-server
Minet
A (not so) basic Minecraft Pocket Edition server written in C#
Stars: ✭ 706 (+1710.26%)
Mutual labels:  minecraft, minecraft-server
Feather
A Minecraft server implementation in Rust
Stars: ✭ 896 (+2197.44%)
Mutual labels:  minecraft, minecraft-server

Minecraft Server Status Script for PHP

By Patrick K. (Nox Nebula).
http://www.silexboard.org/, https://github.com/NoxNebula/Minecraft-Server-Status

This is a lightweight script, which reads the server infos of Minecraft servers.
The simple script (MinecraftServerStatusSimple.class.php) supports Minecraft server beta 1.8 or higher.
The newer one (MinecraftServerStatus.class.php) uses the query method and supports Minecraft servers beginning with Minecraft 1.0.0.

Features

  • Query the server if "enable-query" is activated and parse the server infos.
    The simple one read and parse the build-in server infos from minecraft beta 1.8 or higher servers.
  • OOPHP
  • Handles some errors
  • Easy to use
  • Lightweight
  • Fallback

Requirements

  • PHP 5.4.0 (You need to edit the scripts, if you want to use older php versions)
  • PHP allowed stream sockets (stream_socket_client, fwrite, fread, fclose)

How to use the script

Make sure in your server.properties are the following lines:

enable-query=true
query.port=25565

<?php
require_once('MinecraftServerStatus.class.php');
$Server = new MinecraftServerStatus('example-minecraft-host.com');
?>
MinecraftServerStatus($Host, $Port = 25565, $Timeout = 1)

Check Online/Offline

You can easily check if the server is online or offline:

$Server->Get('online');

This will return a boolean, if it's true, the server is online else false.

Get the player count

echo $Server->Get('numplayers').' / '.$Server->Get('maxplayers');

Get a list of online players

foreach($Server->Get('players') as $Player)
	echo $Player.'<br>';

Get the whole info / status

$ServerStatus = $Server->Get();

All available "hooks"

The most of these hooks are only available if the server has query enabled or the server is not vanilla.

'hostname'
'gametype'
'game_id'
'version'
'plugins'
'map'
'numplayers'
'maxplayers'
'hostport'
'hostip'
'online'
'software'
note to check if $Server->Get('hook'); return the expected value (No hook = false).

Fallback

You can just use the "MinecraftServerStatus.class.php" file without the simple one, but if you want a fallback (fewer server infos but works everytime if the requested server is ok) you also should have the "MinecraftServerStatusSimple.class.php" in the same folder.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].