Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lib16/rss-builder-php
lib16 RSS Builder is a PHP 7 library for creating RSS feeds.
https://github.com/lib16/rss-builder-php
composer feeds php php-library php7 rss rss-builder rss-writer
Last synced: about 2 months ago
JSON representation
lib16 RSS Builder is a PHP 7 library for creating RSS feeds.
- Host: GitHub
- URL: https://github.com/lib16/rss-builder-php
- Owner: lib16
- License: mit
- Created: 2017-06-11T18:18:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-27T07:11:40.000Z (almost 4 years ago)
- Last Synced: 2024-10-31T06:51:35.899Z (about 2 months ago)
- Topics: composer, feeds, php, php-library, php7, rss, rss-builder, rss-writer
- Language: PHP
- Homepage:
- Size: 41 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lib16 RSS Builder for PHP 7
A library for creating RSS feeds written in PHP 7.[![Build Status](https://travis-ci.com/lib16/rss-builder-php.svg?branch=master)](https://travis-ci.com/lib16/rss-builder-php)
[![Coverage](https://codecov.io/gh/lib16/rss-builder-php/branch/master/graph/badge.svg)](https://codecov.io/gh/lib16/rss-builder-php)## Installation with Composer
This package is available on [packagist](https://packagist.org/packages/lib16/rss), so you can use [Composer](https://getcomposer.org) to install it.
Run the following command in your shell:```
composer require lib16/rss
```## Basic Usage
Example markup is taken from [en.wikipedia.org/wiki/Rss](https://en.wikipedia.org/wiki/Rss)```php
pubDate(new DateTime('2010-09-06 00:01 +0'))
->lastBuildDate(new DateTime('2009-09-06 16:20 +0'))
->ttl(1800);$channel
->item(
'Example entry',
'Here is some text containing an interesting description.',
'http://www.example.com/blog/post/1'
)
->guid('7bd204c6-1655-4c27-aeee-53f933c5395f', false)
->pubDate(new DateTime('2009-09-06 16:20 +0'));RssMarkup::headerfields('example');
print $channel;
```
… generates the following output:```xml
RSS Title
This is an example of an RSS feed
http://www.example.com/main.html
Mon, 06 Sep 2010 00:01:00 +0000
Sun, 06 Sep 2009 16:20:00 +0000
1800
Example entry
Here is some text containing an interesting description.
http://www.example.com/blog/post/1
7bd204c6-1655-4c27-aeee-53f933c5395f
Sun, 06 Sep 2009 16:20:00 +0000
```