You are here

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.

Kenyan election IT head Chris Msando found dead
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
Chris Msando was in charge of the computerised voting system in next week's election.
Published: Jul 31, 2017 07:07:09

Iraq War: Bid to prosecute Tony Blair rejected by High Court
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Iraqi general fails in High Court bid to bring private prosecution against the ex-UK prime minister.
Published: Jul 31, 2017 06:07:31

Russia's Putin orders 755 US diplomatic staff to be cut
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
The Russian move reduces US diplomatic staff numbers to the same as Russian diplomats in the US.
Published: Jul 31, 2017 05:07:16

Kabul attack: Gun battle and suicide bombing in Afghan capital
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Afghan security forces are fighting gunmen after a bombing outside the Iraqi embassy.
Published: Jul 31, 2017 05:07:36

Row erupts over 'private' Diana tapes
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Channel 4 is due to broadcast controversial footage of the princess next week.
Published: Jul 31, 2017 05:07:23

Mass Nigerian arrests for gay sex in Lagos State
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
Homosexuality, gay marriage, gay groups and displays of same-sex affection are all illegal in Nigeria.
Published: Jul 31, 2017 05:07:54

Jeanne Moreau: French screen icon dies at 89
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
The screen icon appeared in films like Jules et Jim, Seven Days... Seven Nights and Viva Maria!.
Published: Jul 31, 2017 05:07:26

Venezuela's Maduro claims poll victory as opposition cries foul
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
The opposition disputes the turnout figure of 41.5% saying fewer voted for the constituent assembly.
Published: Jul 31, 2017 03:07:34

Apple 'pulls 60 privacy apps from China'
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
VPN providers say US tech giant has 'sided with censorship' by pulling their products.
Published: Jul 31, 2017 02:07:18

Angelina Jolie denies 'cruel' Cambodia child auditions
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
The actress said allegations she exploited children while casting for a Cambodian film were "false".
Published: Jul 30, 2017 23:07:53

North Korea: US says 'no value' in UN security council meeting
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
The US ambassador to the UN urges China to "seriously challenge" North Korea over missile launches.
Published: Jul 30, 2017 22:07:59

'Today I climbed Kilimanjaro' says girl, aged 8
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
Eight-year-old Roxy Getter from Florida is now the youngest girl to climb Mount Kilimanjaro.
Published: Jul 30, 2017 18:07:49

Elephants in Malawi relocated as part of conservation project
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
Rangers in Malawi take on the mammoth task of moving hundreds of elephants to safer national parks.
Published: Jul 30, 2017 18:07:51

Kenya police kill gunman at Deputy President Ruto's home
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
The man had forced his way into the home with a machete, and hidden inside for hours, police say.
Published: Jul 30, 2017 03:07:16

'I don't like hiding my identity so I stay inside'
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml
A new exhibition called 'The House of Kings and Queens' looks at the experiences of LGBT people in Sierra Leone.
Published: Jul 29, 2017 20:07:15

Facebook's Sheryl Sandberg: 'Pay women well'
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
Sheryl Sandberg selects a feminist anthem for Desert Island Discs and says girls should be told to lead.
Published: Jul 29, 2017 20:07:09

Honolulu bans texting while crossing streets in bid to curb injuries
From: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/americas/rss.xml
Hawaii's largest city passes a law aimed at reducing injuries and deaths from "distracted walking".
Published: Jul 29, 2017 14:07:23

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