PHP code example of desarrolla2 / rss-client

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

    

desarrolla2 / rss-client example snippets

 php


use Desarrolla2\RSSClient\RSSClient;

$client = new RSSClient();

$client->addFeeds(
    array(
        'http://news.ycombinator.com/rss',
        'http://feeds.feedburner.com/TechCrunch/',
    ),
    'news'
);

$feeds = $client->fetch('news');

 php


$client->addFeeds(
    array(
        'http://news.ycombinator.com/rss',
        'http://feeds.feedburner.com/TechCrunch/',
    ),
    'news'
);

$feeds = $client->fetch('news');

 php


$feeds = $client->fetch('news', 20);