Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zend Framework Blog:
Create RSS and Atom Feeds
Apr 13, 2017 @ 17:47:01

In a previous post to the Zend Framework blog Matthew Weier O'Phinney talked about parsing feeds with Zend Framework components. In this latest post they cover the other half of the equation - creating RSS and Atom feeds using some of the same components.

In our previous article on zend-feed, we detailed RSS and Atom feed discovery and parsing. Today, we're going to cover its complement: feed creation!

zend-feed provides the ability to create both Atom 1.0 and RSS 2.0 feeds, and even supports custom extensions during feed generation. [...] You can also provide your own custom extensions if desired; these are just what we ship out of the box! In many cases, you don't even need to know about the extensions, as zend-feed will take care of adding in those that are required, based on the data you provide in the feed and entries.

He then shows how to pull in the zendframework/zend-feed component and how to use it to create a simple RSS feed with a title, link, description and "feed link". He then shows how to add new items to the feed (with details for each item) and how to render the resulting feed.

tagged: zendframework tutorial create rss atom feed component

Link: https://framework.zend.com/blog/2017-04-13-zend-feed-writing.html


Trending Topics: