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

Zend Framework Blog:
Discover and Read RSS and Atom Feeds
Apr 07, 2017 @ 14:25:08

On the Zend Framework blog Matthew Weier O'Phinney has written up a new tutorial showing you how to discover and read RSS feeds with the help of the zend-feed component of the Zend Framework.

Remember RSS and Atom feeds? Chances are, you may be reading this because it was on a feed.

[...] An interesting fact: Atom itself is often used as a data transfer format for REST services, particularly content management platforms! As such, being familiar with feeds and having tools to work with them is an important skill for a web developer! In this first of a two part series on feeds, we'll look at feed discovery, as well as reading, using zend-feed's Reader subcomponent.

He gets started by installing the zendframework/zend-feed component with Composer and pulling in the zendframework/zend-http component to make the HTTP requests for the feeds. He then shares some code that helps with RSS/Atom feed discovery on a site and viewing the results. This list is then used as sources to import and code is shown that outputs the basic information about the feed. Finally he shows how to look through the entries in the feed and output the title, link and description of each.

tagged: series discover read parse rss atom feed zendframework zendfeed zendhttp tutorial part1

Link: https://framework.zend.com/blog/2017-04-06-zend-feed-reading.html

MaltBlue.com:
Zend Framework - How To Implement RSS Feeds the Easy Way
Jul 12, 2012 @ 15:08:01

On the MaltBlue blog Matt Setter has a new tutorial posted about creating RSS feeds quickly and easily with the help of the Zend Framework and context switching.

Ever wanted to know how to take an existing Zend Framework application where you have posts, records, news or anything else stored in a data source and updated regularly, and make it available as a feed for your users that they can subscribe to? Well today, that’s what I want to show you. Recently, during the development of the burgeoning PHP cloud development casts site, I had just that situation.

He shows you how to set up some of the routing for the RSS and Atom feeds, pointing them to specific module/controller/action paths for handling. He then creates a "_getFeed()" method that pulls together the needed content and uses the Zend_Feed_Writer_Feed component to create the feed of the correct type. This is then exported, returned and - thanks to a bit more configuration - turned into a correctly-formatted feed.

tagged: zendframework rss atom feed tutorial zendfeed

Link:

Qafoo.com:
Remember your calls for papers (CfP Manager)
Nov 04, 2010 @ 13:45:06

On Qafoo.com there's a new tool that's been introduced to help you keep track of the current Call for Papers that are currently happening for PHP conferences. The start of the PHP conference season is in full swing, and sometimes it can be hard to keep up. Their Call for Papers Manager can keep that information at your fingertips.

The tool works quite simple: You can add CFPs you know about and which are relevant for the PHP community through a simple form. In order to remember the CFPs, you can configure two kinds of reminders: fFor upcoming CFPs and for ending CFPs. For each of these lists, you can determine when to be reminded, like 2 days before the event occurs. These lists can then be easily integrated into your normal feed reader using an RSS or Atom feed.

You can use the URL requested to get different kinds of reminders delivered to your feed reader too. If you have a conference and your Call for Papers is open or upcoming, add it to the list!

tagged: callforpapers cfp manager tool reminder feed rss atom

Link:

ZendCasts.com:
Creating RSS & Atom Feeds with Zend_Feed
Sep 07, 2010 @ 16:27:55

New on ZendCasts.com this screencast helps you use the Zend Framework's Zend_Feed component to create simple RSS and Atom feeds for your application.

The screencast shows you how to create a basic controller with information for a sample blog post (title, date creates, content, etc) and a simple method to create default posts. A second controller is made to handle the feed creation and two actions are created - one for RSS and the other for Atom. The posts are then parsed and pushed out to views for displaying as feeds.

The site has more great screencasts where this came from so check out their screencasts section for ones on other topics like ZendX_JQuery, working with Zend_Log, and validation with Zend_Validate.

tagged: zendfeed rss atom tutorial screencast

Link:

Thomas Weinert's Blog:
Using PHP DOM With XPath
Apr 13, 2010 @ 18:18:32

Thomas Weinert has a recent post to his blog showing how to use one of the more powerful XML-handling features that PHP's DOM extension includes - XPath.

Often I hear people say "We use SimpleXML, because DOM is so noisy and complex". Well, I don't think so. This article explains how you can parse a XML (an Atom feed) using the PHP DOM extension. No other libraries are involved.

In his example he loads an external feed (his own) into a DOM object, blocks any errors with a few handy functions and creates a DOMXPath object on the DOM object to get ready for his queries. He shows how to make searches for titles, subtitles, looping over attributes and an element list returned from one of the first queries. A full code listing is also provided to show how it all fits together.

tagged: dom xpath domxpath tutorial search atom

Link:

NETTUTS.com:
How To Build a Widget to Display your Buzzing
Apr 09, 2010 @ 17:16:50

On NETTUTS.com a tutorial has been posted recently showing you how to build a widget for Buzz, the Google's service similar to Twitter. If you've ever worked with the Twitter timeline concept, using Buzz will feel very familiar. Unfortunately, for the moment at least, it's a read-only kind of thing.

At the moment, there’s no API to work with the Buzz service; Google is expected to provide one within the next several months, however, for now, the public updates are available as Atom feeds.

They grab these Atom feeds via a proxy PHP script (can't cross-domain with Ajax, after all) and then some Ajax to real the latest from this proxy. The results are displayed in a (very familiar looking) timeline with the help of the included HTML and CSS/images. The last part of the process is to push it into a jQuery plugin for easier use down the line. You can get the source download here and check out a demo online.

tagged: widget googlebuzz tutorial timeline atom

Link:

IBM developerWorks:
Use the YouTube API with PHP
Apr 17, 2008 @ 03:42:36

In this new tutorial on the IBM developerWorks website, they show you how - with a little simple HTML and PHP - to integrate functionality from the YouTube API into your site.

The YouTube video sharing site allows Web application developers to access public content through its REST-based developer API. [...] This article introduces the YouTube Data API, demonstrates how you can use it to browse user-generated video content; access video metadata, comments and responses; and perform keyword searches.

They help you get started by outlining the format that the YouTube messages use (Atom feeds) and how to run a query against the API and return back the custom data for things like video categories, popularity and the results of keyword searches.

tagged: youtube api tutorial category keyword search atom feed

Link:

Padraic Brady's Blog:
Zend_Feed: Getting Started With Aggregating RSS/Atom Content
Feb 12, 2008 @ 15:32:00

Padraic Brady has put together a very comprehensive post on his blog today about using the Zend_Feed component of the Zend Framework to help with the aggregation of content from other sites (like RSS and Atom feeds).

In this entry I explore Zend_Feed from the perspective of someone aggregating RSS and Atom feeds with a view to building a database of uniquely identified content for later presentation in a "Planet" style application. [...] In fact all we create here is a simple command line script to aggregate content frequently (e.g. just set up cron to run it every hour or so) into a database for later presentation.

He guides you through each step of the way:

  • Setting Up Database And Models
  • The Aggregator Script Foundation
  • Using Zend_Feed to get common data for RSS/Atom entries
  • Putting It All Together

There's plenty of code (and SQL to insert) in the post and he explains each point well, helping to make the development process smoother. There's even a summary section to toss in a few extra bits of information just in case you missed them along the way.

tagged: zendfeed zendframework aggregate rss atom feed content

Link:

Alexander Netkachev's Blog:
Syndicate content with Zend Framework Zend_Feed classes
Apr 02, 2007 @ 12:44:00

Alexander Netkachev has posted a quick tutorial today to his blog about how to use the Zend Framework (specifically the Zend_Feed component) to create an XML feed for your site.

This article explains basics of content syndications and demonstrates how to use Zend Framework Zend_Feed classes for consuming a news feed of your site.

His format of choice is Atom, slightly different from the RSS most sites use. He includes a sample document to show some of the differences (assuming you know the RSS format, of course) - both complex and simple versions. Also included is a UML layout of the Zend_Feed class, showing all of the methods and properties therein.

With the groundwork laid, he starts on the sample application - creating an Atom feed from a PHP array of data. He grabs the information from the database and pulls it into the controller where it's parsed and massaged into the array format the output needs. Then it's just a matter of passing it to the view and voila - an Atom feed worthy of consumption.

tagged: syndicate content zendframework zendfeed atom format syndicate content zendframework zendfeed atom format

Link:


Trending Topics: