PHPackages                             lukasss93/minecraft-server-status - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lukasss93/minecraft-server-status

ActiveProject[Utility &amp; Helpers](/categories/utility)

lukasss93/minecraft-server-status
=================================

PHP library to check Minecraft Servers Status

2.0(7y ago)425.1k8[1 issues](https://github.com/Lukasss93/minecraft-server-status/issues)[1 PRs](https://github.com/Lukasss93/minecraft-server-status/pulls)MITPHPPHP &gt;=5.6

Since Oct 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Lukasss93/minecraft-server-status)[ Packagist](https://packagist.org/packages/lukasss93/minecraft-server-status)[ RSS](/packages/lukasss93-minecraft-server-status/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)DependenciesVersions (4)Used By (0)

Minecraft Server Status
=======================

[](#minecraft-server-status)

[![Latest Stable Version](https://camo.githubusercontent.com/457bdcaad54d0cd856eb7d618ee8c162cdf60923205089b94526335bb9479b12/68747470733a2f2f706f7365722e707567782e6f72672f6c756b6173737339332f6d696e6563726166742d7365727665722d7374617475732f762f737461626c65)](https://packagist.org/packages/lukasss93/minecraft-server-status)[![Total Downloads](https://camo.githubusercontent.com/cb640adb785ba69f2881ba7e4ad519bb3abffe038a90a9b20e873745ca73d82a/68747470733a2f2f706f7365722e707567782e6f72672f6c756b6173737339332f6d696e6563726166742d7365727665722d7374617475732f646f776e6c6f616473)](https://packagist.org/packages/lukasss93/minecraft-server-status)[![License](https://camo.githubusercontent.com/33fec6ca9289e3d08c12de148847e6593f3c0a8779ecb28ec7ab5b80b143dd1c/68747470733a2f2f706f7365722e707567782e6f72672f6c756b6173737339332f6d696e6563726166742d7365727665722d7374617475732f6c6963656e7365)](https://packagist.org/packages/lukasss93/minecraft-server-status)[![PHP](https://camo.githubusercontent.com/10ee540c05707eb2f2508294c08de599565c364dcd2af967d91be71b0e66953b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344352e362d677265656e2e737667)](https://camo.githubusercontent.com/10ee540c05707eb2f2508294c08de599565c364dcd2af967d91be71b0e66953b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344352e362d677265656e2e737667)

> This library can be used to check Minecraft Servers Status for some basic information.

**⚠ Please do not create issues when you are unable to retrieve information from a server, unless you can prove that there is a bug within the library.**

Differences between Ping and Query
----------------------------------

[](#differences-between-ping-and-query)

There are two methods of retrieving information about a Minecraft server.

- **Ping**

    Ping protocol was added in Minecraft 1.7 and is used to query the server for minimal amount of information (hostname, motd, icon, and a sample of players). This is easier to use and doesn't require extra setup on server side. It uses TCP protocol on the same port as you would connect to your server an optional parameter `IsOld17` which can be used to query servers on version 1.6 or older. *N.B.: this method doesn't work with Minecraft: Bedrock Edition*
- **Query**

    This method uses GameSpy4 protocol, and requires enabling `query` listener in your `server.properties` like this:

    > *enable-query=true*

    > *query.port=25565*

    Query allows to request a full list of servers' plugins and players, however this method is more prone to breaking, so if you don't need all this information, stick to the ping method as it's more reliable.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.6
- Json Extension
- Iconv Extension

Installation
------------

[](#installation)

You can install this library with composer:

`composer require lukasss93/minecraft-server-status`

Using
-----

[](#using)

### MCPing

[](#mcping)

#### Using

[](#using-1)

```
