Hey everyone!
I've created a function that consumes an RSS feed from Flickr using Zend_Feed. Unfortunately I am struggling to extract some keys!
I can get the < title > and such by echoing
$entry->title();
But how can I echo out something like < media:thumbnail >?
I'm sure there's a completely simple way of doing this but I can't for the life of me figure it out!
Thank you everyone.
Here is an example entry
<entry>
<id>http://gdata.youtube.com/feeds/api/videos/T-Pq6QSeH7A</id>
<published>2009-09-16T11:51:20.000Z</published>
<updated>2009-09-18T02:37:35.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/>
<category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='Games' label='Gaming'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='torchlight'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='vanquisher'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='mmo'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='mmorpg'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='massively'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='multiplayer'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='online'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='game'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='mmohub'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='hub'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='forums'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='reviews'/>
<title type='text'>Torchlight - Vanquisher Gameplay</title>
<content type='text'>I'm so excited to reveal the latest trailer for Torchlight, featuring the third class, the Vanquisher!</content>
<link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=T-Pq6QSeH7A&amp;feature=youtube_gdata'/>
<link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/T-Pq6QSeH7A/responses'/>
<link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/T-Pq6QSeH7A/related'/>
<link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='http://m.youtube.com/details?v=T-Pq6QSeH7A'/>
<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/mmolifetv/uploads/T-Pq6QSeH7A'/>
<author>
<name>mmolifetv</name>
<uri>http://gdata.youtube.com/feeds/api/users/mmolifetv</uri>
</author>
<gd:comments>
<gd:feedLink href='http://gdata.youtube.com/feeds/api/videos/T-Pq6QSeH7A/comments' countHint='0'/>
</gd:comments>
<media:group>
<media:category label='Gaming' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>Games</media:category>
<media:content url='http://www.youtube.com/v/T-Pq6QSeH7A?f=user_uploads&amp;app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='97' yt:format='5'/>
<media:content url='rtsp://rtsp2.youtube.com/CigLENy73wIaHwmwH54E6erjTxMYDSANFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='97' yt:format='1'/>
<media:content url='rtsp://rtsp2.youtube.com/CigLENy73wIaHwmwH54E6erjTxMYESARFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='97' yt:format='6'/>
<media:description type='plain'>I'm so excited to reveal the latest trailer for Torchlight, featuring the third class, the Vanquisher!</media:description>
<media:keywords>torchlight, vanquisher, mmo, mmorpg, massively, multiplayer, online, game, mmohub, hub, forums, reviews</media:keywords>
<media:player url='http://www.youtube.com/watch?v=T-Pq6QSeH7A&amp;feature=youtube_gdata'/>
<media:thumbnail url='http://i.ytimg.com/vi/T-Pq6QSeH7A/2.jpg' height='90' width='120' time='00:00:48.500'/>
<media:thumbnail url='http://i.ytimg.com/vi/T-Pq6QSeH7A/1.jpg' height='90' width='120' time='00:00:24.250'/>
<media:thumbnail url='http://i.ytimg.com/vi/T-Pq6QSeH7A/3.jpg' height='90' width='120' time='00:01:12.750'/>
<media:thumbnail url='http://i.ytimg.com/vi/T-Pq6QSeH7A/0.jpg' height='240' width='320' time='00:00:48.500'/>
<media:title type='plain'>Torchlight - Vanquisher Gameplay</media:title>
<yt:duration seconds='97'/>
</media:group>
<gd:rating average='5.0' max='5' min='1' numRaters='1' rel='http://schemas.google.com/g/2005#overall'/>
<yt:statistics favoriteCount='0' viewCount='24'/>
I would like to extract the first thumbnail url from the entry.