Hey everyone,
Parsing RSS is not my strong point and I am making a news feed for a client and they want me to use the Yahoo News RSS feed. I am using the following code.
<?php
$url = "http://news.yahoo.com/rss/europe";
$xml = simplexml_load_file( $url );
?>
<h3 id="ln">Latest News</h3>
<?php
$newsCount = 0;
foreach ( $xml->channel->item as $item ) {
?>
<h4><?php echo $item->title; ?></h4>
<br />
<?php
if( ++$newsCount == 3 ) {
break;
}
}
?>
I need to get this part of the feed.
<media:content url="http://l.yimg.com/bt/api/res/1.2/hzvrEk_IExvAFn.mR9tetQ--/YXBwaWQ9eW5ld3M7Zmk9ZmlsbDtoPTg2O3E9ODU7dz0xMzA-/http://media.zenfs.com/en_us/News/ap_webfeeds/47cd94137a81a60b0d0f6a70670049cf.jpg" type="image/jpeg" width="130" height="86"/>
How do I incorporate this into the above code?
Thanks in advance.