https://github.com/chipslays/rss-feedly
📢 Simple RSS feed reader for PHP.
https://github.com/chipslays/rss-feedly
feed library php rss rss-feed rss-parser rss-reader
Last synced: 6 months ago
JSON representation
📢 Simple RSS feed reader for PHP.
- Host: GitHub
- URL: https://github.com/chipslays/rss-feedly
- Owner: chipslays
- License: mit
- Created: 2021-09-19T21:58:14.000Z (over 4 years ago)
- Default Branch: 2.x
- Last Pushed: 2021-12-30T04:14:55.000Z (over 4 years ago)
- Last Synced: 2025-05-02T03:19:39.674Z (12 months ago)
- Topics: feed, library, php, rss, rss-feed, rss-parser, rss-reader
- Language: PHP
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📢 Feedly
Simple RSS feed reader for PHP.
## Installation
```bash
composer require chipslays/rss-feedly
```
## Usage
Simple example:
```php
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:
```php
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`](examples).
## License
MIT.