PHP code example of roelofjan-elsinga / rss-feed-generator

1. Go to this page and download the library: Download roelofjan-elsinga/rss-feed-generator 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/ */

    

roelofjan-elsinga / rss-feed-generator example snippets


use RssFeedGenerator\RssFeedGenerator;

/**@var \RssFeedGenerator\FeedConfiguration $configuration*/

$generator = RssFeedGenerator::withConfiguration($configuration);

// or

$generator = new RssFeedGenerator($configuration);

/**@var \RssFeedGenerator\FeedItem $feed_item*/

$generator->add($feed_item);

$rss_string = $generator->generate();

print $rss_string;