homepage Welcome to WebmasterWorld Guest from 54.237.98.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

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?
nicmacc

5+ Year Member



 
Msg#: 3820244 posted 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

<entry>
<id>tag:example.com,2006:asset/500238803683</id>
<title>Skull T-Rex</title>
<link rel="alternate" href="http://www.example.com/examplepedia#qry=sast-500238803683" />
<updated>2009-01-06T10:44:43.868Z</updated>
<author>
<name>werderfan2012</name>
<uri>2265665319</uri>
</author>
<modeltype>0x9ea3031a</modeltype>
<content type="html">
<img src="http://ll-803.example.org/example/static/thumb/500/238/803/500238803683.png" />
</content>
<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 =)
</summary>
<category scheme="tag" term="werderfan2012" />
</entry>

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]

 

bill

WebmasterWorld Administrator bill us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3820244 posted 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?

nicmacc

5+ Year Member



 
Msg#: 3820244 posted 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!

bill

WebmasterWorld Administrator bill us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3820244 posted 1:56 am on Jan 15, 2009 (gmt 0)

What was the solution?

nicmacc

5+ Year Member



 
Msg#: 3820244 posted 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