Thumbnail through PHP RSS parser



Hello, folks!

I'm trying to parse RSS feed and display it on my own page.
MagpieRSS looks good enough for me, but I have a little problem.
http://magpierss.sourceforge.net/

I want to display not only the title and description of each article,
but the thumbnail as well.
For example, I tried to do that with this feed.
http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml
Everything is alright with the title and the description, but I can't
do the thumbnail thing. What I've tried is the following:

foreach ($rss->items as $item ) {
$title = $item[title];
$url = $item[link];
$description = $item[description];
$thumbnail = $item['media:thumbnail'];
echo "<a href=$url>$title</a></li><br>";
echo $description;
echo "<img $thumbnail>";

}

As I said before, the other things are fine, but it's not showing the
thumbnail. This is the structure:

<title>txt</title>
<description>txt</description>
<media:thumbnail width="X" height="Y" url="url"/>

And the following line of the php code returns blank result.
(probably because we require parameter of media:thumbnail, not
the value 'inside' it):

$thumbnail = $item['media:thumbnail'];

So I am interested in that parameter url, but I do not know how
can we get it.

Thanks in advance for any help!
.



Relevant Pages

  • Re: Thumbnail through PHP RSS parser
    ... I'm trying to parse RSS feed and display it on my own page. ... MagpieRSS looks good enough for me, but I have a little problem. ... but the thumbnail as well. ... So I am interested in that parameter url, but I do not know how ...
    (php.general)
  • Re: [PHP] Thumbnail through PHP RSS parser
    ... I'm trying to parse RSS feed and display it on my own page. ... MagpieRSS looks good enough for me, but I have a little problem. ... but the thumbnail as well. ... So I am interested in that parameter url, but I do not know how ...
    (php.general)
  • Thumbnail through PHP RSS parser
    ... I'm trying to parse RSS feed and display it on my own page. ... MagpieRSS looks good enough for me, but I have a little problem. ... but the thumbnail as well. ... So I am interested in that parameter url, but I do not know how ...
    (php.general)
  • Thumbnail through PHP RSS parser
    ... I'm trying to parse RSS feed and display it on my own page. ... MagpieRSS looks good enough for me, but I have a little problem. ... but the thumbnail as well. ... So I am interested in that parameter url, but I do not know how ...
    (php.general)
  • Re: xfce desktop - no thumbnails of jpg files
    ... displayed a small thumbnail of each image, as its icon. ... Can XFCE's desktop also display thumbnails as image files' icon? ... XFCE 4.8 which is included in Fedora 17 does *not* support this, ...
    (Fedora)