PHP code example of phergie / phergie-irc-connection

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

    

phergie / phergie-irc-connection example snippets


$connection = new \Phergie\Irc\Connection();

$connection
    ->setServerHostname('hostname')
    ->setServerPort(6668)
    ->setPassword('password')
    ->setNickname('nickname')
    ->setUsername('username')
    ->setHostname('hostname')
    ->setServername('servername')
    ->setRealname('realname')
    ->setOption('option', 'value');

echo $connection->getServerHostname();
echo $connection->getServerPort();
echo $connection->getPassword();
echo $connection->getNickname();
echo $connection->getUsername();
echo $connection->getHostname();
echo $connection->getServername();
echo $connection->getRealname();
echo $connection->getOption('option');

curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit