Articles: rss2array function

This is a small PHP script to read an RSS feed into a PHP array to be used on websites.
Added: 2006-08-10 18:36:53 - Modified: 2006-08-10 18:42:34 - Level: Beginner
Printer friendly version PDF File
Recommend this article to a friend.

Bookmark this on google Bookmark this on del.icio.us Submit this to digg Bookmark this at yahoo Bookmark this at reddit Bookmark this at furl Search technorati for links to this page Toggle more

Introduction

At the request of an acquaintance I wrote a quick method to convert an RSS feed into a PHP array. The usage is fairly simple, as shown in the example below.

The script opens a socket and reads the information. This way an external library such as cURL is not required. It thereby performs proper handling of HTTP/1.1 chunked data if this is served.

If you like these functions, please link back to this website

Example

$rss_array = rss2array("http://www.kfwebs.net/news/rss.xml"); print_r($rss_array);

Download

Download

Related articles:



[Sitemap]