homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
Forum Library, Charter, Moderators: bill & werty

RSS, ATOM, and Related Technologies Forum

magpie RSS content type help?

 2:41 pm on Jan 6, 2009 (gmt 0)

I'm basically trying to get my RSS module to display an RSS feed which includes images.

Heres a relevant section from the xml file

<title>Skull T-Rex</title>
<link rel="alternate" href="http://www.example.com/examplepedia#qry=sast-500238803683" />
<content type="html">
<img src="http://ll-803.example.org/example/static/thumb/500/238/803/500238803683.png" />
<link rel="enclosure" href="http://ll-803.example.org/example/static/thumb/500/238/803/500238803683.png" type="image/png" length="31277" />
<link rel="enclosure" href="http://ll-803.example.org/example/static/model/500/238/803/500238803683.xml" type="application/x-creature+xml" />
<summary>Hope you like it =)
<category scheme="tag" term="werderfan2012" />

I want to include the <Content type="html"> tag into my page (the image, basically) and heres my php file trying to get the relevant info:

$rss = fetch_rss('http://www.example.com/atom/assets/view/TOP_RATED_NEW/0/20');
echo "Channel Title: " . $rss->channel['title'] . "<p>";
echo "<ul>";
foreach ($rss->items as $item) {
$href = $item['link'];
$title = $item['title'];
$descr = $item['summary'];
echo "<a href=$href>$title</a><br>";
echo "$descr <br><br>";
echo "</ul>";

I havn't the slightest clue what to include in my php file to display the relevant image. My PHP/XML is rusty at best :p Does anyone have any ideas? Any help on this would be MASSIVELY appreciated! thanks in advance :)

[edited by: bill at 4:18 am (utc) on Jan. 7, 2009]
[edit reason] use example.com please [/edit]



 1:47 am on Jan 15, 2009 (gmt 0)

Welcome to WebmasterWorld nicmacc.

I was hoping someone would jump in here to help you out. Did you have any luck with this?


 1:50 am on Jan 15, 2009 (gmt 0)

i did eventually figure it out thanks...took some googling and some heavy experimentation but i got there in the end!


 1:56 am on Jan 15, 2009 (gmt 0)

What was the solution?


 12:04 pm on Jan 15, 2009 (gmt 0)

for your PHP file you want to include

$content = $item['atom_content'];

then just a matter of including $content in whatever manner suits you :P

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved