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.

Putin moves towards annexing Crimea
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Putin informs parliament of Crimea's request to join Russia, in formal step towards annexation
Published: Mar 18, 2014 07:03:44

Thailand to lift emergency rule
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Thailand is to lift its state of emergency on Wednesday, as tensions ease following weeks of anti-government protests, officials say.
Published: Mar 18, 2014 06:03:30

Many killed by Afghan suicide bomber
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
A suicide bomber kills at least 15 people, including women and children, at a busy market in northern Afghanistan.
Published: Mar 18, 2014 06:03:16

China begins land search for plane
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
China begins searching its territory for the missing Malaysian plane and says no evidence found of terror links among Chinese passengers.
Published: Mar 18, 2014 05:03:10

Caesars to open in South Korea
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
South Korea grants approval to US firm Caesars Entertainment to open a casino with Indonesian conglomerate Lippo near Incheon airport outside Seoul.
Published: Mar 18, 2014 03:03:56

Kanye West plea in assault case
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
Rapper Kanye West has been sentenced to two years probation for assaulting a photographer at Los Angeles International Airport in July.
Published: Mar 18, 2014 03:03:41

Tributes pour in for L'Wren Scott
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
Tributes pour in for designer L'Wren Scott, found dead in New York in an apparent suicide, as Sir Mick Jagger denies a report they had recently split.
Published: Mar 18, 2014 03:03:06

Kenya seizes two 'with bombs in car'
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
Kenyan police heighten security in the port-city of Mombasa after two men are arrested in a car allegedly on their way to place bombs.
Published: Mar 18, 2014 03:03:52

Air Canada stops flying to Venezuela
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Air Canada suspends flights between Toronto and Caracas over security concerns.
Published: Mar 18, 2014 01:03:20

Car ban imposed in polluted Paris
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Hundreds of police monitored traffic in Paris on Monday as high air pollution levels prompted the government to impose major restrictions.
Published: Mar 18, 2014 01:03:44

Deadly bomb blast at Libya army base
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
A car bomb at a military base leaves at least eight soldiers dead in the eastern Libyan city of Benghazi, medical sources say.
Published: Mar 17, 2014 23:03:31

Navy Seals board rogue Libya tanker
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
US Navy Seals have taken control of a tanker full of oil loaded from a rebel-held port in Libya, the Pentagon says.
Published: Mar 17, 2014 23:03:07

Deal in US general's sex crimes case
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
A US Army general accused of sex crimes pleads guilty to lesser counts, as prosecutors drop the most serious charges against him.
Published: Mar 17, 2014 20:03:42

Earthquake felt near Los Angeles
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
A 4.4-magnitude earthquake strikes the Los Angeles, California, area, rattling nerves but causing no major damage or injury or deaths.
Published: Mar 17, 2014 19:03:01

Boycotts mar US St Patrick's parades
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
The world's largest St Patrick's Day parade kicks off under a cloud of boycotts over the organisers' refusal to include openly gay groups.
Published: Mar 17, 2014 19:03:47

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
Inhoud syndiceren