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

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

suin/php-rss-writer
===================

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

1.6.0(8y ago)2651.4M↓14.8%63[6 issues](https://github.com/suin/php-rss-writer/issues)[2 PRs](https://github.com/suin/php-rss-writer/pulls)20MITPHPPHP &gt;=5.4.0

Since Aug 22Pushed 3y ago19 watchersCompare

[ Source](https://github.com/suin/php-rss-writer)[ Packagist](https://packagist.org/packages/suin/php-rss-writer)[ Docs](https://github.com/suin/php-rss-writer)[ RSS](/packages/suin-php-rss-writer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (11)Used By (20)

\\Suin\\RSSWriter
=================

[](#suinrsswriter)

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

This library can also be used to publish Podcasts.

[![Latest Stable Version](https://camo.githubusercontent.com/a9391a9a633b6368581cb40692e157ac074ef4ba577ccb7cb06931e8a9bc6f4f/68747470733a2f2f706f7365722e707567782e6f72672f7375696e2f7068702d7273732d7772697465722f762f737461626c65)](https://packagist.org/packages/suin/php-rss-writer)[![Total Downloads](https://camo.githubusercontent.com/2b91b6ea7414d2996c553049b4dfb64a360e593a34ccb304d34ebe4613356369/68747470733a2f2f706f7365722e707567782e6f72672f7375696e2f7068702d7273732d7772697465722f646f776e6c6f616473)](https://packagist.org/packages/suin/php-rss-writer)[![Daily Downloads](https://camo.githubusercontent.com/522c63e7ba57e7aa0a1136596a4f99e97ebafdfae920c4ceec2a8eb0b2360938/68747470733a2f2f706f7365722e707567782e6f72672f7375696e2f7068702d7273732d7772697465722f642f6461696c79)](https://packagist.org/packages/suin/php-rss-writer)[![License](https://camo.githubusercontent.com/2783cfc409082f794b96b13ae113970aa5c60f08ce0bde6741913742db486e73/68747470733a2f2f706f7365722e707567782e6f72672f7375696e2f7068702d7273732d7772697465722f6c6963656e7365)](https://packagist.org/packages/suin/php-rss-writer)[![Build Status](https://camo.githubusercontent.com/2bd8b266424a31e490f7b2fd9abe54a09896917e670fe6373a0a8dae34ec826e/68747470733a2f2f7472617669732d63692e6f72672f7375696e2f7068702d7273732d7772697465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/suin/php-rss-writer)[![Codacy Badge](https://camo.githubusercontent.com/20f5895c968ec0c39cce8bdedeb6623262999d51087f0a5879b7d947d749b168/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f67726164652f3163356534653238653765323466366162373232316232313636623562366337)](https://www.codacy.com/app/suinyeze/php-rss-writer)

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 suin/php-rss-writer
```

### Manual installation

[](#manual-installation)

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

```
{
	"require": {
		"suin/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/Suin/RSSWriter/FeedInterface.php), [`ChannelInterface`](src/Suin/RSSWriter/ChannelInterface.php) and [`ItemInterface`](src/Suin/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

47

—

FairBetter than 94% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity59

Moderate usage in the ecosystem

Community37

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 52.9% 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 ~198 days

Recently: every ~124 days

Total

10

Last Release

3232d ago

PHP version history (2 changes)1.0PHP &gt;=5.3.0

1.3.3PHP &gt;=5.4.0

### Community

Maintainers

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

---

Top Contributors

[![suin](https://avatars.githubusercontent.com/u/855338?v=4)](https://github.com/suin "suin (36 commits)")[![buffcode](https://avatars.githubusercontent.com/u/2863518?v=4)](https://github.com/buffcode "buffcode (16 commits)")[![maltsev](https://avatars.githubusercontent.com/u/923973?v=4)](https://github.com/maltsev "maltsev (4 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (3 commits)")[![christianp](https://avatars.githubusercontent.com/u/19513?v=4)](https://github.com/christianp "christianp (3 commits)")[![marcdenning](https://avatars.githubusercontent.com/u/2893119?v=4)](https://github.com/marcdenning "marcdenning (2 commits)")[![1franck](https://avatars.githubusercontent.com/u/1209308?v=4)](https://github.com/1franck "1franck (1 commits)")[![jeroenmoors](https://avatars.githubusercontent.com/u/1665245?v=4)](https://github.com/jeroenmoors "jeroenmoors (1 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (1 commits)")[![barryp](https://avatars.githubusercontent.com/u/945959?v=4)](https://github.com/barryp "barryp (1 commits)")

---

Tags

phpfeedrssgeneratorwriter

### Embed Badge

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

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

###  Alternatives

[rumenx/php-feed

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

3652.3k](/packages/rumenx-php-feed)[sokolnikov911/yandex-turbo-pages

PHP7 Yandex Turbo Pages RSS feed generator

4686.9k](/packages/sokolnikov911-yandex-turbo-pages)[tomloprod/radiance

A deterministic mesh gradient avatar generator for PHP.

1393.7k](/packages/tomloprod-radiance)

PHPackages © 2026

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