website_games/test2.php
Brendan Golden 98aaf7333e initial commit
Signed-off-by: Brendan Golden <git@brendan.ie>
2023-10-01 02:36:07 +01:00

21 lines
485 B
PHP

<?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( );
}
?>