programster / rss-feed
A package to make creating an RSS feed easy.
Installs: 179
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/programster/rss-feed
Requires
- php: >=7.0.0
This package is not auto-updated.
Last update: 2025-10-12 11:37:05 UTC
README
A package to make generating an RSS 2.0 feed easy and straightforward.
Installation
composer require programster/rss-feed
Example Usage
<?php require_once(__DIR__ . '/vendor/autoload.php'); use Programster\RssFeed; $items = array(); $pubDate = new DateTime(); $pubDate->setTimestamp(1534698676); $items[] = new RssFeed\RssItem( "Article Title", "https://blog.mydomain.org/path/to/article", "A description of the article goes here.", $pubDate, "my-article-category" ); // .. add another item, and another, and another... $channel = new RssFeed\RssChannel( "My Awesome Blog", "https://blog.mydomain.com", "Tutorials on This and That", "en", new RssFeed\NullRssImage(), ...$items ); $rss = new RssFeed\RssFeed($channel); header('Content-type: application/xml'); echo $rss;