承接 jarne/querylibrary 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jarne/querylibrary

Composer 安装命令:

composer require jarne/querylibrary

包简介

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

README 文档

README

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


Packagist version PHP version CircleCI License

• Install
• Usage
• Examples
• Contribution
• License

📦 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

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 file.

⌨️ 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

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

Please read our Contribution Guidelines before creating an issue or submitting a pull request.

Thanks for your interest 🎉👍!

👨‍⚖️ License

MIT

统计信息

  • 总下载量: 153
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-12-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固