6CC001 Workshop - week 06

From mi-linux
Revision as of 15:33, 22 May 2009 by In9352 (talk | contribs)
Jump to navigationJump to search

Main Page >> Web Application Development >> Workbook >> Week 06

  $feed_url = "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml";

  // Get data from feed file
  $response = file_get_contents($feed_url);
    
  // Insert XML into structure
  $xml = simplexml_load_string($response); 

  // Browse structure
  foreach($xml->channel->item as $one_item)
    echo $one_item->title."<BR>";