chipslays/rss-feedly

Simple RSS feed reader.

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/chipslays/rss-feedly

2.0.1 2021-12-24 05:43 UTC

This package is auto-updated.

Last update: 2025-09-29 02:29:39 UTC


README

Simple RSS feed reader for PHP.

Installation

composer require chipslays/rss-feedly

Usage

Simple example:

use Feedly\Feedly;

require __DIR__ . '/vendor/autoload.php';

$feed = (new Feedly)->get('https://www.rt.com/rss/news/');

foreach ($feed->posts as $post) {
    echo $post['title'] . PHP_EOL;
}

And much advanced example:

use Feedly\Feedly;

require __DIR__ . '/vendor/autoload.php';

$posts = $rss
    ->get('https://www.rt.com/rss/news/')
    ->except(['Trump'], ['title'])
    ->except(['Politics'], ['category'])
    ->priority([
        [100, ['Google', 'Tesla', 'Durov'], ['title', 'description']],
        [Feedly::DEFAULT_PRIORITY + 1, ['Apple'], ['description']],
    ]);

// get posts in the last 6 hours
$posts = $posts->where('date', '>', strtotime('-6 hours'));

// can use foreach or `each` method
$posts->each(function ($post) {
    echo $post['title'] . PHP_EOL;
});

foreach ($posts as $post) {
    // ...
}

Examples

More exampels can be found here.

License

MIT.