PHPackages                             fabwebstudio/php-rss-writer - 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. fabwebstudio/php-rss-writer

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

fabwebstudio/php-rss-writer
===========================

Yet another simple RSS writer library for PHP 5.4 or later. Extended From suin/php-rss-writer

013PHP

Since Jul 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/fabwebstudio/php-rss-writer)[ Packagist](https://packagist.org/packages/fabwebstudio/php-rss-writer)[ RSS](/packages/fabwebstudio-php-rss-writer/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

\\FabWebStudio\\RSSWriter
=========================

[](#fabwebstudiorsswriter)

`\FabWebStudio\RSSWriter` is yet another simple RSS writer library for PHP 5.4 or later. This component is Licensed under MIT license.

Quick demo
----------

[](#quick-demo)

```
$feed = new Feed();

$channel = new Channel();
$channel
    ->title('Channel Title')
    ->description('Channel Description')
    ->url('http://blog.example.com')
    ->feedUrl('http://blog.example.com/rss')
    ->language('en-US')
    ->copyright('Copyright 2012, Foo Bar')
    ->pubDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))
    ->lastBuildDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))
    ->ttl(60)
    ->pubsubhubbub('http://example.com/feed.xml', 'http://pubsubhubbub.appspot.com') // This is optional. Specify PubSubHubbub discovery if you want.
    ->appendTo($feed);

// Blog item
$item = new Item();
$item
    ->title('Blog Entry Title')
    ->description('Blog body')
    ->contentEncoded('Blog body')
    ->url('http://blog.example.com/2012/08/21/blog-entry/')
    ->author('John Smith')
    ->pubDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))
    ->guid('http://blog.example.com/2012/08/21/blog-entry/', true)
    ->preferCdata(true) // By this, title and description become CDATA wrapped HTML.
    ->appendTo($channel);

// Podcast item
$item = new Item();
$item
    ->title('Some Podcast Entry')
    ->description('Podcast body')
    ->url('http://podcast.example.com/2012/08/21/podcast-entry/')
    ->enclosure('http://podcast.example.com/2012/08/21/podcast.mp3', 4889, 'audio/mpeg')
    ->appendTo($channel);

echo $feed; // or echo $feed->render();
```

Output:

```

    Channel Title
    http://blog.example.com
    Channel Description
    en-US
    Copyright 2012, Foo Bar
    Tue, 21 Aug 2012 10:50:37 +0000
    Tue, 21 Aug 2012 10:50:37 +0000
    60

      Blog Entry Title]]>
      http://blog.example.com/2012/08/21/blog-entry/
      Blog body]]>
      Blog body]]>
      http://blog.example.com/2012/08/21/blog-entry/
      Tue, 21 Aug 2012 10:50:37 +0000
      John Smith

      Some Podcast Entry
      http://podcast.example.com/2012/08/21/podcast-entry/
      &lt;div&gt;Podcast body&lt;/div&gt;

```

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

[](#installation)

### Easy installation

[](#easy-installation)

You can install directly via [Composer](https://getcomposer.org/):

```
$ composer require fabwebstudio/php-rss-writer
```

### Manual installation

[](#manual-installation)

Add the following code to your `composer.json` file:

```
{
	"require": {
		"fabwebstudio/php-rss-writer": ">=1.0"
	}
}
```

...and run composer to install it:

```
$ composer install
```

Finally, include `vendor/autoload.php` in your product:

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

How to use
----------

[](#how-to-use)

The [`examples`](examples) directory contains usage examples for RSSWriter.

If you want to know APIs, please see [`FeedInterface`](src/FabWebStudio/RSSWriter/FeedInterface.php), [`ChannelInterface`](src/FabWebStudio/RSSWriter/ChannelInterface.php) and [`ItemInterface`](src/FabWebStudio/RSSWriter/ItemInterface.php).

How to Test
-----------

[](#how-to-test)

```
$ vendor/bin/phpunit
```

Test through PHP 5.4 ~ PHP 7.0
------------------------------

[](#test-through-php-54--php-70)

```
$ docker-compose up
```

License
-------

[](#license)

MIT license

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c78757bc2b7065dcae8b5aaa118a62bdfe458e3625eedfa2e75c243f03e21bfc?d=identicon)[fabwebstudio](/maintainers/fabwebstudio)

---

Top Contributors

[![fab-rkd](https://avatars.githubusercontent.com/u/20355726?v=4)](https://github.com/fab-rkd "fab-rkd (2 commits)")

### Embed Badge

![Health badge](/badges/fabwebstudio-php-rss-writer/health.svg)

```
[![Health](https://phpackages.com/badges/fabwebstudio-php-rss-writer/health.svg)](https://phpackages.com/packages/fabwebstudio-php-rss-writer)
```

PHPackages © 2026

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