2017 © Pedro Peláez
 

library minecraftserverstatus

Minecraft Server Status Query, written in PHP, with online players, motd, favicon and more server related informations without plugins and enable-query.

image

mops1k/minecraftserverstatus

Minecraft Server Status Query, written in PHP, with online players, motd, favicon and more server related informations without plugins and enable-query.

  • Saturday, February 4, 2017
  • by mops1k
  • Repository
  • 1 Watchers
  • 1 Stars
  • 85 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 5 % Grown

The README.md

Minecraft Server Status

Minecraft Server Status, library to make query with online players, motd, favicon and more server related informations without plugins and enable-query., (*1)

*Tested with Spigot 1.11, (*2)

Installation

composer require mops1k/minecraftserverstatus

Tutorial

<?php
use MinecraftServerStatus\MinecraftServerStatus;

require '../vendor/autoload.php';

$status = new MinecraftServerStatus();
$status
    ->setHost('localhost')
    ->setPort(25565)
;

if (!$status->query()) {
    echo "The Server is offline!";
} else {
    $data = $status->getData();

    if ($data->getFavicon()) {
        echo "<img width=\"64\" height=\"64\" src=\"" . $data->getFavicon() . "\" /> <br>";
    }
    echo "The Server " . $data->getHostname() . " is running on " . $data->getVersion() . " and is online,
        currently are " . $data->getPlayers() . " players online
        of a maximum of " . $data->getMaxPlayers() . ". The motd of the server is '" . $data->getDescription() . "'.
        The server has a ping of " . $data->getPing() . " milliseconds.";
}

If the server is offline $status->query() returns false else it returns true and fill the server informations to $status->getData()., (*3)

The Versions

04/02 2017

dev-master

9999999-dev

Minecraft Server Status Query, written in PHP, with online players, motd, favicon and more server related informations without plugins and enable-query.

  Sources   Download

BSD

by Avatar mops1k
by Julian Spravil

server status minecraft

04/02 2017

1.0.1

1.0.1.0

Minecraft Server Status Query, written in PHP, with online players, motd, favicon and more server related informations without plugins and enable-query.

  Sources   Download

BSD

by Avatar mops1k
by Julian Spravil

server status minecraft

31/01 2017

1.0.0

1.0.0.0

Minecraft Server Status Query, written in PHP, with online players, motd, favicon and more server related informations without plugins and enable-query.

  Sources   Download

BSD

by Avatar mops1k
by Julian Spravil

server status minecraft