Show Multiple RSS Feeds

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.

At least 35 dead in Iraq attacks
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
At least 35 people have been killed in Iraq and dozens injured in a wave of bombings and shootings targeting mainly police officers.
Published: Feb 23, 2012 08:02:35

Fresh Koran demos in Afghanistan
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
There are fresh anti-American protests across Afghanistan, in the wake of the burning of Korans at a US military base.
Published: Feb 23, 2012 08:02:49

Deadly blast at Pakistan bus stop
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
At least eight people are killed and 30 injured after a bomb hit a bus stop in the city of Peshawar in north-west Pakistan, police officials say.
Published: Feb 23, 2012 08:02:51

Buenos Aires 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 at least 49 people and leaves more than 600 injured, officials say.
Published: Feb 23, 2012 06:02:55

Santorum in spotlight in Arizona
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
Rick Santorum comes under fire from rival US Republican candidates in a crucial TV debate days ahead of two key primaries.
Published: Feb 23, 2012 05:02:21

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 23, 2012 05: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 23, 2012 04:02:56

US and N Korea in nuclear talks
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
US and North Korean officials are meeting in Beijing for the first talks on Pyongyang's nuclear programme since the death of Kim Jong-il.
Published: Feb 23, 2012 03:02:19

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 23, 2012 01:02:10

World leaders to discuss Somalia
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
African and Western leaders gather for a major London conference on the future of Somalia, to discuss political change, terrorism and piracy.
Published: Feb 23, 2012 01: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 23:02:27

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 22:02:53

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 19: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 19: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 19: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 17: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