{"id":16674866,"url":"https://github.com/lukasss93/minecraft-server-status","last_synced_at":"2025-08-11T19:09:59.995Z","repository":{"id":38054079,"uuid":"58268109","full_name":"Lukasss93/minecraft-server-status","owner":"Lukasss93","description":"PHP library to check Minecraft Servers Status","archived":false,"fork":false,"pushed_at":"2024-08-07T15:00:44.000Z","size":111,"stargazers_count":42,"open_issues_count":2,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-11T19:09:47.146Z","etag":null,"topics":["check","minecraft","ping","query","server","status"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lukasss93.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-05-07T13:53:24.000Z","updated_at":"2025-03-01T04:09:00.000Z","dependencies_parsed_at":"2025-06-16T12:38:06.789Z","dependency_job_id":"8989fd9c-74d1-4432-9fe7-ab3285bb16d7","html_url":"https://github.com/Lukasss93/minecraft-server-status","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Lukasss93/minecraft-server-status","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukasss93%2Fminecraft-server-status","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukasss93%2Fminecraft-server-status/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukasss93%2Fminecraft-server-status/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukasss93%2Fminecraft-server-status/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lukasss93","download_url":"https://codeload.github.com/Lukasss93/minecraft-server-status/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lukasss93%2Fminecraft-server-status/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269940202,"owners_count":24500433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["check","minecraft","ping","query","server","status"],"created_at":"2024-10-12T12:44:42.130Z","updated_at":"2025-08-11T19:09:59.948Z","avatar_url":"https://github.com/Lukasss93.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minecraft Server Status\n\n[![Latest Stable Version](https://poser.pugx.org/lukasss93/minecraft-server-status/v/stable)](https://packagist.org/packages/lukasss93/minecraft-server-status)\n[![Total Downloads](https://poser.pugx.org/lukasss93/minecraft-server-status/downloads)](https://packagist.org/packages/lukasss93/minecraft-server-status)\n[![License](https://poser.pugx.org/lukasss93/minecraft-server-status/license)](https://packagist.org/packages/lukasss93/minecraft-server-status)\n![PHP](https://img.shields.io/badge/php-%3E%3D5.6-green.svg)\n\n\u003e This library can be used to check Minecraft Servers Status for some basic information.\n\n**⚠ 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.**\n\n## Differences between Ping and Query\nThere are two methods of retrieving information about a Minecraft server.\n\n* **Ping**\n\n    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). \n    This is easier to use and doesn't require extra setup on server side. \n    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    *N.B.: this method doesn't work with Minecraft: Bedrock Edition*\n\n* **Query**\n\n    This method uses GameSpy4 protocol, and requires enabling `query` listener in your `server.properties` like this:\n\n    \u003e*enable-query=true*\n    \n    \u003e*query.port=25565*\n\n    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.\n\nRequirements\n---------\n* PHP \u003e= 5.6\n* Json Extension\n* Iconv Extension\n\nInstallation\n---------\nYou can install this library with composer:\n\n`composer require lukasss93/minecraft-server-status`\n\n\nUsing\n---------\n### MCPing\n#### Using\n```php\n\u003c?php\n\t//using the class\n\tuse MCServerStatus\\MCPing;\n\t\n\t//include composer autoload\n\trequire_once('../vendor/autoload.php');\n\t\n\t//checking account\n\t$response=MCPing::check('hostname or IP');\n\t\n\t//get informations from object\n\tvar_dump($response);\n\t\n\t//or from array\n\tvar_dump($response-\u003etoArray());\n?\u003e\n```\n\nIf you want to get `ping` info from a server that uses a version older than Minecraft 1.7,\nthen add true parameter after `$timeout`.\n\nPlease note that this library does resolve **SRV** records too.\n\n#### Input\nThe `check()` method has 4 optional parameters:\n\n\\# | Parameter | Type | Default |Description\n---|-----------|------|---------|-----------\n1 | host | string | 127.0.0.1 |Server Hostname or IP address\n2 | port | int| 25565 | Server port\n3 | timeout | int | 2 | Timeout (in seconds)\n4 | isOld17 | bool | false | Boolean value to find informations on servers that uses a version older than Minecraft 1.7\n\n#### Output\nThe `check()` method return an object with the following properties:\n\nKey|Type|Description\n---|----|------------\nonline|bool|Returns `true` if the server is online else `false`\nerror|string|Returns any error message\nhostname|string|Returns the server hostname or IP address \naddress|string|Returns server IP address\nport|int|Returns the server port\nping|int|Returns server ping\nversion|string|Returns the server version\nprotocol|int|Returns the server protocol\nplayers|int|Returns the number of online players\nmax_players|int|Returns the maximum number of players that can enter the server\nsample_player_list|array|Returns a partial list of online players\nmotd|string|Returns server description\nfavicon|string|Returns an image in Base64 string\nmods|array|Returns a list of installed mods on the server\n\n_You can use the following methods after_ `check()` _method:_\n\nMethod|Description\n------|-----------\ntoArray()|Return the object properties as an array\ngetMotdToText()|Get the motd without the format codes\ngetMotdToHtml()|Get the motd as HTML\n\n\n----\n\n### MCQuery\n#### Using\n```php\n\u003c?php\n\t//using the class\n\tuse MCServerStatus\\MCQuery;\n\t\n\t//include composer autoload\n\trequire_once('../vendor/autoload.php');\n\t\n\t//checking account\n\t$response=MCQuery::check('hostname or IP');\n\t\n\t//get informations from object\n\tvar_dump($response);\n\t\n\t//or from array\n\tvar_dump($response-\u003etoArray());\n?\u003e\n```\n\n#### Input\nThe `check()` method has 4 optional parameters:\n\n\\# | Parameter | Type | Default |Description\n---|-----------|------|---------|-----------\n1 | host | string | 127.0.0.1 | Server Hostname or IP address\n2 | port | int| 25565 | Server query port\n3 | timeout | int | 2 | Timeout (in seconds)\n4 | resolveSRV | bool | true | Resolve SRV record\n\n#### Output\nThe `check()` method return an array with the following properties:\n\nKey|Type|Description\n---|----|------------\nonline|bool|Returns `true` if the server is online else `false`\nerror|string|Returns any error message\nhostname|string|Returns the server hostname or IP address\naddress|string|Returns server IP address\nport|int|Returns the server port\nversion|string|Returns the server version\nsoftware|string|Returns the server software\ngame_type|string|Returns the server software type\ngame_name|string|Return the server software name\nplayers|int|Returns the number of online players\nmax_players|int|Returns the maximum number of players that can enter the server\nplayer_list|array|Returns a list of online players\nmotd|string|Returns server description\nmap|string|Returns the server map name\nplugins|array|Returns a list of installed plugins on the server\n\n_You can use the following methods after_ `check()` _method:_\n\nMethod|Description\n------|-----------\ntoArray()|Return the object properties as an array\ngetMotdToText()|Get the motd without the format codes\ngetMotdToHtml()|Get the motd as HTML\n\nChangelog\n---------\nAll notable changes to this project will be documented [here](https://github.com/Lukasss93/minecraft-server-status/blob/master/CHANGELOG.md).\n\n### Recent changes\n## [2.0]\n- First release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasss93%2Fminecraft-server-status","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukasss93%2Fminecraft-server-status","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasss93%2Fminecraft-server-status/lists"}