View Single Post
Join Date: Dec 2007
Posts: 7
Reputation: simps0n is an unknown quantity at this point 
Solved Threads: 0
simps0n simps0n is offline Offline
Newbie Poster

Thumbnail through PHP RSS parser

 
0
  #1
Jul 21st, 2008
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.

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. Everything is alright with the title and the description, but I can't do the thumbnail thing. What I've tried is the following:
RSS, Web Services and SOAP Syntax (Toggle Plain Text)
  1. foreach ($rss->items as $item ) {
  2. $title = $item[title];
  3. $url = $item[link];
  4. $description = $item[description];
  5. $thumbnail = $item['media:thumbnail'];
  6. echo "<a href=$url>$title</a></li><br>";
  7. echo $description;
  8. echo "<img src=$thumbnail>";
  9. }
As I said before, the other things are fine, but it's not showing the thumbnail.

Thanks in advance for any help!
Reply With Quote