2017 © Pedro Peláez
 

library php-minecraft-pinger

Ping minecraft PC servers from PHP.

image

nathan818/php-minecraft-pinger

Ping minecraft PC servers from PHP.

  • Thursday, October 20, 2016
  • by nathan818fr
  • Repository
  • 1 Watchers
  • 0 Stars
  • 97 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 4 % Grown

The README.md

PHP Minecraft Pinger

Ping minecraft PC servers from PHP. Support Minecraft 1.7+ (works with Spigot, Bukkit, ...)., (*1)

Installation

This library is published on packagist.org, so you can add it to your composer.json file for an easy installation:, (*2)

composer require nathan818/php-minecraft-pinger

Example

Ping a server:, (*3)

<?php
include(__DIR__ . '/vendor/autoload.php');

use MinecraftPinger\MinecraftPinger;
use MinecraftPinger\MinecraftPingException;

$pinger = new MinecraftPinger('mc.hypixel.net', 25565); // Port is optional
try
{
    $pingResponse = $pinger->ping();
    echo 'There are ' . $pingResponse->players->online . ' players online on Hypixel!' . "\n";
}
catch (MinecraftPingException $e)
{
    // An error has occurred
    echo $e->getMessage();
}

The Versions

20/10 2016

dev-master

9999999-dev

Ping minecraft PC servers from PHP.

  Sources   Download

AGPL-3.0

The Requires

 

by Nathan Poirier

20/10 2016

1.0.0

1.0.0.0

Ping minecraft PC servers from PHP.

  Sources   Download

AGPL-3.0

The Requires

 

by Nathan Poirier