PHP code example of viktoras / rss-reader

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

    

viktoras / rss-reader example snippets


$reader = new Reader(file_get_contents('https://packagist.org/feeds/packages.rss'));

echo $reader->getChannel()->getTitle() . PHP_EOL;

foreach ($reader->getItems() as $item) {
    echo ' - ' . $item->getTitle() . PHP_EOL;
}