website_games/test2.php

22 lines
485 B
PHP
Raw Normal View History

<?php
require __DIR__ . '/libsrc/MinecraftQuery.php';
require __DIR__ . '/lib/MinecraftQueryException.php';
use xPaw\MinecraftQuery;
use xPaw\MinecraftQueryException;
$Query = new MinecraftQuery( );
try
{
$Query->Connect( 'localhost', 25555 );
print_r( $Query->GetInfo( ) );
print_r( $Query->GetPlayers( ) );
}
catch( MinecraftQueryException $e )
{
echo $e->getMessage( );
}
?>