qexyorg / mcserverinfo
MCServerInfo this is a library for get statistics from minecraft server
1.2.0
2019-04-08 11:29 UTC
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2025-04-21 10:12:35 UTC
README
Minecraft server stats
Install
composer require qexyorg/mcserverinfo
Example
<?php use qexyorg\MCServerInfo\MCServerInfo; require_once('vendor/autoload.php'); $connect = MCServerInfo::Connect('mc.my-super-server.net', 25565); if(!$connect->request()){ exit($connect->getError()); } var_dump($connect->getResponse()->rawData());
In this example, method will be found automatically (Can be slow!!!).
If you know what is a method used you can set it manually
Example with manually method
<?php use qexyorg\MCServerInfo\MCServerInfo; require_once('vendor/autoload.php'); $connect = MCServerInfo::Connect('mc.my-super-server.net', 25565)->setMethod(MCServerInfo::METHOD_PING); if(!$connect->request()){ exit($connect->getError()); } var_dump($connect->getResponse()->rawData());
More examples you can find in "examples" folder
Documentation: https://app.gitbook.com/@qexy/s/mcserverinfo/