PHPackages                             jarne/querylibrary - 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. jarne/querylibrary

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

jarne/querylibrary
==================

A library to fetch the query information of Minecraft: Bedrock Edition servers

1.1.3(7y ago)3153MITPHPPHP &gt;=7.2

Since Dec 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jarne/QueryLibrary)[ Packagist](https://packagist.org/packages/jarne/querylibrary)[ Docs](https://github.com/jarne/QueryLibrary)[ RSS](/packages/jarne-querylibrary/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

QueryLibrary
============

[](#querylibrary)

A library to fetch the query information of Minecraft: Bedrock Edition servers

 [ ![Packagist version](https://camo.githubusercontent.com/8f6549c5d872e5f3efc8879de68e973fba4f0109ae1aae06a8b79cdd140cdc71/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a61726e652f71756572796c6962726172792e737667) ](https://packagist.org/packages/jarne/querylibrary) [ ![PHP version](https://camo.githubusercontent.com/e2ca98053abb2c7a9083362c88ad0d13177b557d64cd088baf7aa5ac139742fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a61726e652f71756572796c6962726172792e737667) ](https://php.net) [ ![CircleCI](https://camo.githubusercontent.com/1221d6d13d24399a8dbc3587c59f8defbe4becfb12e794396e93373be5ac67fd/68747470733a2f2f696d672e736869656c64732e696f2f636972636c6563692f70726f6a6563742f6769746875622f6a61726e652f51756572794c6962726172792e737667) ](https://circleci.com/gh/jarne/QueryLibrary) [ ![License](https://camo.githubusercontent.com/c7cf65ea7f2c349eb179b2990270cf88ef4a56b47347730a548164ae04223d7a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a61726e652f51756572794c6962726172792e737667) ](https://github.com/jarne/QueryLibrary/blob/master/LICENSE)

[• Install](#-install)
[• Usage](#-usage)
[• Examples](#%EF%B8%8F-examples)
[• Contribution](#-contribution)
[• License](#%EF%B8%8F-license)

📦 Install
---------

[](#-install)

This library requires PHP 7.2 or newer in order to work correctly. You can install it with:

```
$ composer require jarne/querylibrary

```

If you don't like Composer, you can also clone the repository with:

```
$ git clone https://github.com/jarne/QueryLibrary

```

👨‍💻 Usage
---------

[](#‍-usage)

There is only one function called `fetch` to get the query information of a server. You must enter the IP of the server. If you don't specify the port or the timeout, it'll use the default port 19132 and a timeout of 5 seconds. The data is returned in a `Result`-object which has functions to get each value.

```
/**
 * Fetch query information of a server
 *
 * @param string $ip
 * @param int $port
 * @param int $timeoutSeconds
 *
 * @return Result
 */
public function fetch(
    string $ip,
    int $port = 19132,
    int $timeoutSeconds = 5
): Result
```

For a list of all available get-value-functions, take a look into the [Result.php](https://github.com/jarne/QueryLibrary/blob/master/src/jarne/querylibrary/utils/Result.php) file.

⌨️ Examples
-----------

[](#️-examples)

As an example, we're going to fetch the default level name of a PocketMine-MP server running on the local machine.

```
$queryLibrary = new QueryLibrary();
$result = $queryLibrary->fetch("127.0.0.1");

echo "The default level name is " . $result->getDefaultLevelName();
```

🙋‍ Contribution
---------------

[](#‍-contribution)

Contributions are always very welcome! It's completely equal if you're a beginner or a more experienced developer.

Please read our **[Contribution Guidelines](CONTRIBUTING.md)** before creating an issue or submitting a pull request.

Thanks for your interest 🎉👍!

👨‍⚖️ License
------------

[](#‍️-license)

[MIT](https://github.com/jarne/QueryLibrary/blob/master/LICENSE)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~123 days

Total

5

Last Release

2580d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.0

1.1.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d77f0932ed40ec75f6ac4bd19f07945843f36a6574610096d67cd6726022e75?d=identicon)[jarne](/maintainers/jarne)

---

Top Contributors

[![jarne](https://avatars.githubusercontent.com/u/15860314?v=4)](https://github.com/jarne "jarne (19 commits)")

---

Tags

libraryminecraftplayerpocketmine-mpquerylibraryqueryminecraftplayerpocketmine-mp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jarne-querylibrary/health.svg)

```
[![Health](https://phpackages.com/badges/jarne-querylibrary/health.svg)](https://phpackages.com/packages/jarne-querylibrary)
```

###  Alternatives

[league/iso3166

ISO 3166-1 PHP Library

69536.3M116](/packages/league-iso3166)[league/uri-components

URI components manipulation library

31932.3M67](/packages/league-uri-components)[dekor/php-array-table

PHP Library for printing associative arrays as text table (similar to mysql terminal console)

296.6M2](/packages/dekor-php-array-table)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
