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.

Arroyo pleads not guilty to fraud
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Former Philippine President Gloria Arroyo pleads not guilty to electoral fraud before a court in Manila.
Published: Feb 22, 2012 20:02:03

Gillard calls leadership ballot
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Australian Prime Minister Julia Gillard calls a ballot for the leadership of the Labor Party on Monday to end a tussle with Kevin Rudd.
Published: Feb 22, 2012 19:02:56

US rivals spar in Arizona debate
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
The four Republican candidates take each other on in a crucial TV debate days ahead of two key primaries in the US states of Arizona and Michigan.
Published: Feb 22, 2012 18:02:17

Homs reporters' deaths condemned
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
The killings of two Western journalists in Homs among 60 reported deaths across Syria spark further outrage towards the Damascus government.
Published: Feb 22, 2012 16:02:10

World leaders to discuss Somalia
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
African and Western leaders are to discuss the future of Somalia, including the threat from terrorism and piracy, at a major conference in London.
Published: Feb 22, 2012 16:02:38

Verdict on Mubarak set for 2 June
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
A trial verdict for Egyptian ex-President Hosni Mubarak, accused of ordering the killing of protesters in the revolution that ousted him, is set for 2 June.
Published: Feb 22, 2012 14:02:27

Karzai urges calm over Koran row
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Afghan President Hamid Karzai urges Afghans "not to resort to violence" after protests over the burning of the Koran at a US airbase near Kabul.
Published: Feb 22, 2012 14:02:51

US dismay at IAEA Iranian visit
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
The White House expresses disappointment on the barring of UN nuclear inspectors from a site in Iran, calling the visit a "failure" for Tehran.
Published: Feb 22, 2012 14:02:16

Argentina train crash 'kills 49'
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
A commuter train crash at a station in the Argentine capital, Buenos Aires, kills 49 people and leaves at least 600 injured, officials say.
Published: Feb 22, 2012 13:02:35

NYPD 'spied on' Newark Muslims
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
The New York Police Department carried out covert surveillance of Muslims in nearby Newark, New Jersey, police records reveal.
Published: Feb 22, 2012 13:02:53

Cherie Blair starts hacking case
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Cherie Blair has started legal proceedings over phone hacking, her solicitor confirms.
Published: Feb 22, 2012 10:02:28

South Sudan expels oil firm boss
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
South Sudan expels the head of a Chinese and Malaysian-owned oil firm following its investigation into Khartoum's "theft" of oil worth $815m (£518m).
Published: Feb 22, 2012 10:02:59

Obama seeks US corporate tax cut
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
US President Barack Obama proposes a cut in corporate tax and an end to tax loopholes, as part of his election-year strategy on the economy.
Published: Feb 22, 2012 10:02:09

Somalia militants lose key town
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
Ethiopian and Somali troops capture Baidoa, a strategic stronghold of al-Shabab Islamist militants, as the UN approves extra African Union troops for Somalia.
Published: Feb 22, 2012 10:02:14

Nigeria rig 'may burn for months'
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
A gas-fuelled fire, with flames as high as 5m, may burn for months in waters off the Niger Delta in south-east Nigeria, a Chevron spokesperson tells the BBC.
Published: Feb 22, 2012 08:02:46

The Code:

<?php
  $urls 
= array("http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml",
                
"http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml",
                
"http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml");
  
$feeds = array();
  
$feeds _querypath_examples_show_multiplerss($urls10);
    
  foreach(
$feeds as $date => $item) {
    
$out .= '<p>' l($item['title'], $item['link']) 
            .
' <br />From: ' $item['url'
            .
' <br />' $item['desc'
            .
' <br />Published: ' date("M d, Y H:m:s"$date) . '</p>';
  }
  
?>

References:

The QueryPath API