1. Go to this page and download the library: Download nadybot/aolib 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/ */
nadybot / aolib example snippets
declare(strict_types=1);
use function Amp\Socket\connect;
use Monolog\Handler\StreamHandler;
use Monolog\Processor\PsrLogMessageProcessor;
use Monolog\{Level, Logger};
et = connect("chat.d1.funcom.com:7105");
$client = new \AO\Client\Basic(
$logger,
new \AO\Connection($logger, $socket, $socket);
\AO\Parser::createDefault($logger)
);
$client->login(username: "Myuser", password: "Mypassword", character: "Mychar");
while (($package = $client->read()) !== null) {
// Process package
}