Pull Ace of Spades server information from PHP using the LAN discovery protocol.
- PHP 8.1+
composer require aosdotcoffee/heyPrint the server information of aloha.pk tower of babel:
<?php
use AosDotCoffee\Hey\LanClient;
$client = new LanClient('midwest.us.aloha.pk', 32000);
$server = $client->requestHellolan();
echo "Name: {$server->name}\n";
echo "Players: {$server->currentPlayers}/{$server->maxPlayers}\n";
echo "Map: {$server->map}\n";New versions follow SemVer. Named arguments are covered by the backwards compatibility promise.