website_games/test.php

26 lines
516 B
PHP
Raw Normal View History

<?php
require __DIR__ . '/lib/MinecraftPing.php';
require __DIR__ . '/lib/MinecraftPingException.php';
use xPaw\MinecraftPing;
use xPaw\MinecraftPingException;
try
{
$Query = new MinecraftPing( 'localhost', 25555 );
print_r( $Query->Query() );
}
catch( MinecraftPingException $e )
{
echo $e->getMessage();
}
finally
{
if( $Query )
{
$Query->Close();
}
}
?>