Thumbnail through PHP RSS parser

Please support our RSS, Web Services and SOAP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the RSS, Web Services and SOAP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC