Friday, July 17

RSS PHP: Tutorial #1

In this first RSS PHP Tutorial, we'll look at how PHP uses XML to parse the RSS file.

Here's an example of parsing a RSS file using the function below.

$rss_tags = array(
‘title’,
‘link’,
‘guid’,
‘comments’,
‘description’,
‘pubDate’,
‘category’,
);
$rss_item_tag = ‘item’;
$rss_url = ‘http://rssphp.blogspot.com/feeds/posts/default’;

$rssfeed = rss_to_array($rss_item_tag,$rss_tags,$rss_url);

print_r($rssfeed);

function rss_to_array($tag, $array, $url) {
$doc = new DOMdocument();
$doc->load($url);
$rss_array = array();
$items = array();
foreach($doc->getElementsByTagName($tag) AS $node) {
foreach($array AS $key => $value) {
$items[$value] = $node->getElementsByTagName($value)->item(0)->nodeValue;
}
array_push($rss_array, $items);
}
return $rss_array;
}
?>


And there you have your own RSS parser. All we did was put the feed items into an array, now you do the rest!

Make Money with RSS

RSS Parsing: The Future of RSS Aggregation

Thursday, July 16

RSS Parsing: The Jackpot of the Web

RSS PHP Parsers: Your own RSS Aggregator

RSS PHP Parsers basically allows you to use PHP and the power of RSS to create your own Aggregator. Meaning you can now have an automated website or blog with RSS feeding into it, essentially your own RSS Aggregator.

RSS Parsers make it simple to use the RSS feeds as they deal with RSS parsing issues.
Here we have collected the best free RSS to PHP parsers available.

MagpieRSS
Easy to use RSS PHP parser.
RSS 1.0, 2.0, Atom.

SimplePie
SimplePie is a library of PHP code which parses RSS feeds.

lastRSS
A powerful PHP class for parsing RSS feeds.
All RSS versions supported.

Zend_Feed
Another easy to use RSS parser.
 

Template by James William at 2600 Degrees