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

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


return array(
    'plugins' => array(
        // dependencies
        new \WyriHaximus\Phergie\Plugin\Dns\Plugin,
        new \WyriHaximus\Phergie\Plugin\Http\Plugin,

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

            // cated feed items
            //           keyed by associated connection mask
            'targets' => array(
                'nick1!user1@host1' => array(
                    '#channel1',
                    'user1',
                    // ...
                ),
                'nick2!user2@host2' => array(
                    '#channel2',
                    'user2',
                    // ...
                ),
                // ...
            ),
        
            // optional: time in seconds to wait between polls of feeds for new
            //           content, defaults to 300 (5 minutes)
            'interval' => 300,
        
            // optional: object implementing \Phergie\Irc\Plugin\React\FeedTicker\FormatterInterface
            //           used to format data from feed items prior to their syndication
            'formatter' => new DefaultFormatter(
                '%title% [ %link% ] by %authorname% at %datemodified%',
                'Y-m-d H:i:s'
            ),
        )),
    ),
);

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