PHP code example of phergie / phergie-irc-plugin-react-youtube

1. Go to this page and download the library: Download phergie/phergie-irc-plugin-react-youtube 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-plugin-react-youtube example snippets


return array(

    'plugins' => array(

        // dependencies
        new \WyriHaximus\Phergie\Plugin\Dns\Plugin,
        new \WyriHaximus\Phergie\Plugin\Http\Plugin,
        new \WyriHaximus\Phergie\Plugin\Url\Plugin,

        new \Phergie\Irc\Plugin\React\YouTube\Plugin(array(

            // %'
                    . '; Views %views%'
                    . '; Likes %likes%',

            // optional: date format used for video publish timestamps
            'publishedFormat' => 'n/j/y g:i A',

            // optional: interval format used for video durations
            'durationFormat' => '%im%ss',

        )),

    )
);

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