943,949 Members | Top Members by Rank

Jul 21st, 2008
0

Thumbnail through PHP RSS parser

Expand Post »
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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
simps0n is offline Offline
7 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in RSS, Web Services and SOAP Forum Timeline: How to trace SOAP messages using WSE3.0
Next Thread in RSS, Web Services and SOAP Forum Timeline: formmail.pl





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC