PHP code example of buttress / irc

1. Go to this page and download the library: Download buttress/irc 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/ */

    

buttress / irc example snippets



use Buttress\IRC\Action\ActionManager;
use Buttress\IRC\Action\ConnectionAction;
use Buttress\IRC\Connection\Connection;
use Buttress\IRC\Message\MessageFactory;

$factory = new MessageFactory();
$manager = new ActionManager($factory);

$connect_action = new ConnectionAction('Buttress', '#buttress');
$manager->add('CONNECT', $connection_action);

$connection = new \Connection($manager, 'irc.freenode.org');
$connection->connect();