PHPackages                             mmm545/libgamespyquery - 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. mmm545/libgamespyquery

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

mmm545/libgamespyquery
======================

A virion and library to query servers using GS4

06PHP

Since Aug 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/KygekDev/libgamespyquery)[ Packagist](https://packagist.org/packages/mmm545/libgamespyquery)[ RSS](/packages/mmm545-libgamespyquery/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

libgamespyquery
===============

[](#libgamespyquery)

A query virion and library for Pocketmine-MP
This virion/library uses GS4 to query servers which provides more info. Servers that don't have GS4 supported/enabled can't be queried using this virion/library, so you need to use another virion such as [libpmquery](https://github.com/jasonwynn10/libpmquery)

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

[](#installation)

Add this to your `.poggit.yml` to add the virion into your plugin

```
libs:
  - src: KygekDev/libgamespyquery/libgamespyquery
    branch: main
    version: ^2.0
```

Or if you want to use as a Composer library, open a command line and run this

```
composer require mmm545/libgamespyquery

```

More information about this Composer library can be found in [Packagist](https://packagist.org/packages/mmm545/libgamespyquery)

Usage
-----

[](#usage)

First you create a new `GameSpyQuery` instance, first argument is the IP address to query, second argument is the port to query

```
$query = new GameSpyQuery("someserver.org", 19132);
```

Then we query the server

```
$query->query();
```

You can also set a timeout in seconds (optional), the default timeout is 2 seconds

```
$query->query(5);
```

The `query()` function will throw a `GameSpyQueryException` if the destination IP and port can't be queried, so you need to surround it with a try-catch block
If everything worked correctly, you can use the `get()` function to get some info about the server
List of the data you can get:

```
$query->get("hostname"); // Server MOTD
$query->get("gametype"); // Game type, not sure what that means
$query->get("game_id"); // I think that's the game edition
$query->get("version"); // Version of minecraft the server is running on
$query->get("server_engine"); // Server software being used
$query->get("plugins"); // Plugins list with their version
$query->get("map"); // Current world
$query->get("numplayers"); // Number of online players
$query->get("maxplayers"); // Max number of players
$query->get("whitelist"); // On if whitelist is turned on, otherwise off
$query->get("hostip"); // Host ip
$query->get("hostport"); // Host port
$query->get("players"); // List of online players names
```

In case you want to get the raw response, you can use `getStatusRaw()`

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 57.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ca2bc560de813739e21e5213f9094f4e49749ed0c2f2960e74bbe58f91ec925?d=identicon)[KygekDev](/maintainers/KygekDev)

---

Top Contributors

[![mmm545](https://avatars.githubusercontent.com/u/64874108?v=4)](https://github.com/mmm545 "mmm545 (15 commits)")[![KygekDev](https://avatars.githubusercontent.com/u/68368066?v=4)](https://github.com/KygekDev "KygekDev (9 commits)")[![poggit-bot](https://avatars.githubusercontent.com/u/22427965?v=4)](https://github.com/poggit-bot "poggit-bot (1 commits)")[![xXNiceYT](https://avatars.githubusercontent.com/u/23722462?v=4)](https://github.com/xXNiceYT "xXNiceYT (1 commits)")

### Embed Badge

![Health badge](/badges/mmm545-libgamespyquery/health.svg)

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

###  Alternatives

[ercogx/filament-openai-assistant

Create chat page with OpenAI Assistant

185.6k](/packages/ercogx-filament-openai-assistant)

PHPackages © 2026

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