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

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

ProDevTips.com:
Parsing with Zend HTTP Client
Mar 10, 2009 @ 15:25:02

On ProDevTips.com there's a quick new tutorial posted about using the Zend_Http component of the Zend Framework to fetch a remote page that requires cookie authentication - a "cookie jar".

As it happens I’m very satisfied with the performance of Zend Http when it comes to the fetching and cookie parts. [...] Note [in my example] the use of $client->setCookieJar();, that is all that is needed to manage the logged in state, awesome. Without it the second post to adv_stats.php would’ve failed due to unauthorized access.

This fetching method pulls in the remote file, parses out the table (as defined by a pattern match) and grabs the rows/columns using getRows and getColumns and manipulates the content inside.

tagged: zendhttp client zendframework cookiejar cookie state manage

Link:


Trending Topics: