PHPackages                             shevabam/rss-feed-maker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shevabam/rss-feed-maker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

shevabam/rss-feed-maker
=======================

Create RSS feeds easily in PHP

1.0.1(3y ago)230GPL-2.0-onlyPHPPHP &gt;=7.4.0

Since Mar 28Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/shevabam/rss-feed-maker)[ Packagist](https://packagist.org/packages/shevabam/rss-feed-maker)[ Docs](https://github.com/shevabam/rss-feed-maker)[ RSS](/packages/shevabam-rss-feed-maker/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

RSS Feed Maker
==============

[](#rss-feed-maker)

Create RSS feeds easily in PHP!

This library allows you to create an XML file representing an RSS feed.

Requirement
-----------

[](#requirement)

- PHP 7.4+

Installation
------------

[](#installation)

With Composer, run this command:

```
composer require shevabam/rss-feed-maker

```

Usage
-----

[](#usage)

First, include the library in your code using the Composer autoloader and then create a Feed object.

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

$feed = new \RssFeedMaker\Feed;
```

Next, configure the feed:

```
$feed
    ->setTitle('RSS Feed Title')
    ->setDescription('Recent articles on my website')
    ->setLink('https://website.com')
    ->setCopyright('MyWebsite.com')
    ->setLanguage('en')
    ->setImage([
        'title' => 'Image title',
        'url' => 'https://website.com/Image.jpg',
        'link' => 'https://website.com',
    ])
;
```

Here are the parameters that can be modified for the feed:

RSS TagPHP methodExampleDefaultRequired`title`setTitle()$feed-&gt;setTitle('RSS Feed Title');EmptyYes`description`setDescription()$feed-&gt;setDescription('Recent articles on your website');EmptyYes`lastBuildDate`setLastBuildDate()$feed-&gt;setLastBuildDate();Actual date`pubDate`setPubDate()$feed-&gt;setPubDate();Empty`link`setLink()$feed-&gt;setLink('');EmptyYes`webMaster`setWebmaster()$feed-&gt;setWebmaster('John Doe');Empty`category`setCategory()$feed-&gt;setCategory('Blog');Empty`copyright`setCopyright()$feed-&gt;setCopyright('MyWebsite.com');Empty`language`setLanguage()$feed-&gt;setLanguage('en');en`ttl`setTtl()$feed-&gt;setTtl(30);Empty`image`setImage()$feed-&gt;setImage(\[ 'title' =&gt; 'Image title', 'url' =&gt; '', 'link' =&gt; '' \]);EmptyThe `language` code is described here:

Default encoding is: utf-8. You can change it with:

```
$feed->setEncoding('iso-8859-1');
```

Then, create the items and inject them into the feed:

```
$posts = [
    [
        'title' => 'Post title #1',
        'link' => 'https://website.com/1-post-title',
        'published_at' => '2023-03-18 12:00:00',
        'description' => 'Blog post about something very important',
    ],
    [
        'title' => 'Post title #2',
        'link' => 'https://website.com/2-post-title',
        'published_at' => '2023-03-11 16:30:00',
        'description' => 'Blog post about something very important',
    ],
];

foreach ($posts as $post)
{
    $item = new \RssFeedMaker\Item;

    $item
        ->setTitle($post['title'])
        ->setLink($post['link'])
        ->setDescription($post['description'])
        ->setPubDate($post['published_at'])
    ;

    $feed->addItem($item);
}
```

Parameters for item:

RSS TagPHP methodExampleDefaultRequiredtitlesetTitle()$item-&gt;setTitle('Blog post #1');EmptyYesdescriptionsetDescription()$item-&gt;setDescription('Post content blabla');EmptyYespubDatesetPubDate()$item-&gt;setPubDate();EmptylinksetLink()$item-&gt;setLink('');EmptyYesauthorsetAuthor()$item-&gt;setAuthor('John Doe');EmptycategorysetCategory()$item-&gt;setCategory('Tutorials');EmptyguidsetGuid()$item-&gt;setGuid('...');EmptycommentssetComments()$item-&gt;setComments('');EmptysourcesetSource()$item-&gt;setSource(\[ 'url' =&gt; '...', 'source' =&gt; 'Description', \]);EmptyenclosuresetEnclosure()$item-&gt;setEnclosure(\[ 'url' =&gt; '', 'length' =&gt; 12345, 'type' =&gt; 'audio/mpeg', \]);EmptyFor more information about the RSS schema, please see the [specifications](https://www.rssboard.org/rss-specification).

Finally, generate the XML with:

```
echo $feed->generate();
```

You can save the RSS feed to a file:

```
$feed->save('path/to/the/feed.xml');
```

Full example
------------

[](#full-example)

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

$feed = new \RssFeedMaker\Feed;

$feed
    ->setTitle('RSS Feed Title')
    ->setDescription('Recent articles on your website')
    ->setLink('https://website.com')
    ->setCopyright('MyWebsite.com')
    ->setImage([
        'title' => 'Image title',
        'url' => 'https://website.com/Image.jpg',
        'link' => 'https://website.com',
    ])
;

$posts = [
    [
        'title' => 'Post title #1',
        'link' => 'https://website.com/1-post-title',
        'published_at' => '2023-03-14 12:00:00',
        'author' => 'John Doe',
        'description' => 'Blog post about something very important',
    ],
    [
        'title' => 'Post title #2',
        'link' => 'https://website.com/2-post-title',
        'published_at' => '2023-03-08 16:30:00',
        'author' => 'Jane Doe',
        'description' => 'Blog post number two',
    ],
    [
        'title' => 'Post title #3',
        'link' => 'https://website.com/3-post-title',
        'published_at' => '2023-03-01 08:45:00',
        'enclosure' => [
            'url' => 'https://website.com/podcasts/example.mp3',
            'length' => 12345,
            'type' => 'audio/mpeg',
        ],
    ],
];

foreach ($posts as $post)
{
    $item = new \RssFeedMaker\Item;

    $item->setTitle($post['title']);
    $item->setLink($post['link']);
    $item->setDescription(isset($post['description']) ? $post['description'] : '');
    $item->setPubDate(isset($post['published_at']) ? $post['published_at'] : '');
    $item->setAuthor(isset($post['author']) ? $post['author'] : '');
    $item->setCategory(isset($post['category']) ? $post['category'] : '');
    $item->setGuid(isset($post['guid']) ? $post['guid'] : '');
    $item->setSource(isset($post['source']) ? $post['source'] : []);
    $item->setEnclosure(isset($post['enclosure']) ? $post['enclosure'] : []);

    $feed->addItem($item);
}

$feed->save('public/feed.xml');
```

Result:

```

    RSS Feed Title
    https://website.com
    Recent articles on your website
    en
    Tue, 28 Mar 2023 19:45:47 +0200
    MyWebsite.com

      Image title
      https://website.com/Image.jpg
      https://website.com

        Post title #1]]>

      https://website.com/1-post-title

        Blog post about something very important]]>

      Tue, 14 Mar 2023 12:00:00 +0100
      https://website.com/1-post-title
      John Doe

        Post title #2]]>

      https://website.com/2-post-title

        Blog post number two]]>

      Wed, 8 Mar 2023 16:30:00 +0100
      https://website.com/2-post-title
      Jane Doe

        Post title #3]]>

      https://website.com/3-post-title
      Wed, 1 Mar 2023 08:45:00 +0100
      https://website.com/3-post-title

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance49

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1182d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1798289?v=4)[shevabam](/maintainers/shevabam)[@shevabam](https://github.com/shevabam)

---

Top Contributors

[![shevabam](https://avatars.githubusercontent.com/u/1798289?v=4)](https://github.com/shevabam "shevabam (5 commits)")

---

Tags

feedphprssphpfeedrss

### Embed Badge

![Health badge](/badges/shevabam-rss-feed-maker/health.svg)

```
[![Health](https://phpackages.com/badges/shevabam-rss-feed-maker/health.svg)](https://phpackages.com/packages/shevabam-rss-feed-maker)
```

###  Alternatives

[suin/php-rss-writer

Yet another simple RSS writer library for PHP 5.4 or later.

2651.4M21](/packages/suin-php-rss-writer)[rumenx/php-feed

Framework-agnostic PHP Feed generator for Laravel, Symfony, and more.

3664.1k](/packages/rumenx-php-feed)[fkr/simplepie-bundle

Integrates SimplePie into Symfony

11138.4k](/packages/fkr-simplepie-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
