Transform an RSS feed
Items in the RSS Feed
Display a linked title to each item in the RSS feed
Behind the scenes, this is fetching the RSS feed over HTTP, parsing it, and then creating a list of linked items.
The Syrian Revolution, 30 videos about
The Libyan Revolution, 18 videos about
On Libya & Glenn Greenwald: Are the anti-interventionists becoming counter-revolutionaries?
Vietnam: American Holocaust [DVD]
Trailer for Vietnam: American Holocaust
The Code:
<?php
$url = url('rss.xml', array('absolute' => TRUE));
foreach (qp($url, 'item') as $item) {
$title = $item->find('title')->text();
$link = $item->next('link')->text();
$out .= '<p>' . l($title, $link) . '</p>';
}
?>