在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):thedudeguy/PHP-Minecraft-Query开源软件地址(OpenSource Url):https://github.com/thedudeguy/PHP-Minecraft-Query开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):PHP-Minecraft-QueryA simple PHP class to connect to a minecraft server and get data about the server using the Query Protocol. To connect to a server, Query must be activated on the minecraft server by setting This script connects to the server over UDP. ExamplesAs a Regular PHP Library:require_once('query.php');
$server = new Query('some.minecraftserver.com');
//or new Query('some.minecraftserver.com', $port, $timeout);
if ($server->connect())
{
$info = $server->get_info();
print_r($info);
} As a CodeIgniter Library:$settings = array(
'host' => 'some.minecraftserver.com', //required
'port' => 25565, //optional
'timeout' = 3, //optional
);
$this->load->library('query', $settings);
$this->query->connect();
if ($this->query->is_connected()) {
$info = $this->query->get_info();
print_r($info);
} get_info() resultResult is an array: here is the dump:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论