#################################################################
The article was obtained at the following URL: http://www.kfwebs.net/articles/article/40
The article might be distributed further as long as it is provided as it is, with the credits stated.
The Article was written and first published by KF Webs, at http://www.kfwebs.net
#################################################################
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
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
$rss_array = rss2array("http://www.kfwebs.net/news/rss.xml"); print_r($rss_array);