This repository has been archived on 2020-07-27. You can view files and clone it, but cannot push or open issues/pull-requests.
2017-12-10 06:12:55 +00:00
|
|
|
# Minecraft Server Query
|
2014-02-06 07:59:31 +00:00
|
|
|
|
2018-01-20 14:03:45 +00:00
|
|
|
**This library is not maintained. Please use some supported library like this one: https://github.com/xPaw/PHP-Minecraft-Query**
|
2016-04-04 00:12:12 +00:00
|
|
|
|
2015-10-02 17:00:27 +00:00
|
|
|
A PHP library for checking the status of an enabled Minecraft server ported from python
|
2014-02-06 07:59:31 +00:00
|
|
|
[https://github.com/Dinnerbone/mcstatus](https://github.com/Dinnerbone/mcstatus)
|
|
|
|
|
2017-12-10 06:12:55 +00:00
|
|
|
## Installation
|
|
|
|
|
|
|
|
Add the following code to your composer file.
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"require": {
|
|
|
|
"sandfox-im/bencode": "^1.0"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
2014-02-06 07:59:31 +00:00
|
|
|
|
|
|
|
```php
|
2017-12-10 06:12:55 +00:00
|
|
|
<?php
|
|
|
|
|
2014-02-06 07:59:31 +00:00
|
|
|
$minecraft = new \SandFoxIM\Minecraft\ServerQuery($argv[1], $argv[2], 2);
|
|
|
|
|
|
|
|
echo "Basic info:\n";
|
|
|
|
var_export($minecraft->getStatus());
|
|
|
|
|
|
|
|
echo "Full info:\n";
|
|
|
|
var_export($minecraft->getRules());
|
|
|
|
```
|