I'm basically trying to get my RSS module to display an RSS feed which includes images. Heres a relevant section from the xml file <entry> <id>tag:spore.com,2006:asset/500238803683</id> <title>Skull T-Rex</title> <link rel="alternate" href="http://www.spore.com/sporepedia#qry=sast-500238803683" /> <updated>2009-01-06T10:44:43.868Z</updated> <author> <name>werderfan2012</name> <uri>2265665319</uri> </author> <modeltype>0x9ea3031a</modeltype> [B] <content type="html"> <img src="http://ll-803.ea.com/spore/static/thumb/500/238/803/500238803683.png" /> </content> [/B] <link rel="enclosure" href="http://ll-803.ea.com/spore/static/thumb/500/238/803/500238803683.png" type="image/png" length="31277" /> <link rel="enclosure" href="http://ll-803.ea.com/spore/static/model/500/238/803/500238803683.xml" type="application/x-creature+xml" /> <summary>Hope you like it =) </summary> <category scheme="tag" term="werderfan2012" /> </entry> Code (markup): I've bolded the section i want to include on my page (the image, basically) and heres my php file trying to get the relevant info: $rss = fetch_rss('http://www.spore.com/atom/assets/view/TOP_RATED_NEW/0/20'); echo "Channel Title: " . $rss->channel['title'] . "<p>"; echo "<ul>"; foreach ($rss->items as $item) { $href = $item['link']; $title = $item['title']; $descr = $item['summary']; echo "<a href=$href>$title</a><br>"; echo "$descr <br><br>"; } echo "</ul>"; Code (markup): I havn't the slightest clue what to include in my php file to display the relevant image. My PHP/XML is rusty at best Does anyone have any ideas? Any help on this would be MASSIVELY appreciated! thanks in advance
Actually i think i've half figured something out...i want to use this field <link rel="enclosure" href="http://ll-803.ea.com/spore/static/thumb/500/238/803/500238803683.png" type="image/png" length="31277" /> however, my php script will only recognise the first <link> field it finds. Is there a way to get it to recognise the second one?