PHP code example of aosdotcoffee / hey

1. Go to this page and download the library: Download aosdotcoffee/hey library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aosdotcoffee / hey example snippets




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";