Welcome to WebmasterWorld Guest from 54.159.111.156

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

RSS displaying attributes

Correct way to get RSS feed attributes.

     
8:54 pm on Apr 24, 2012 (gmt 0)

5+ Year Member



I am attempting to display results from an RSS feed using PHP.
I have successfully used magpie [magpierss.sourceforge.net...]
and rss_php [rssphp.net...]

However, both parsers I am having issues getting the attrbute values specifically media:thumbnail
 
<media:content url="http://cache.wdcdn.net/cdn/asset/view/client/sfi/ package/library/id/692313/format/o/h/5c5b86ff5dc804b2d314b3a9718bdef0/ JelloAdultContentDirsCut.m4v?7a6013aef28682d61703dff120d21b12266b54a2 a637283d7d4f0a0b41a1f35116ad845809e136636fd6663e34fb341ed348bcd006.m4v" fileSize="5936750" type="video/mp4" duration="32" height="360" width="640"/>

<media:thumbnail url="http://cache.wdcdn.net/cdn/asset/view/client/sfi/ package/library/id/692313/format/t/size/lg/h/ c374cb3c669fdb346ad82adb16b41b4a/library_692313_lg.jpg? 7a6013aef28682d61703dff120d21b12266b54a2a637283d7d4f0a0b41 a1f35116ad845809e136636fd6663e34fb341ed348bcd006.jpg" height="360" width="634"/>

<media:thumbnail url="http://cache.wdcdn.net/cdn/asset/view/client/sfi/ package/library/id/692313/format/t/size/sm/h/ c374cb3c669fdb346ad82adb16b41b4a/library_692313_sm.jpg? 7a6013aef28682d61703dff120d21b12266b54a2a637283d7d4f0a0b41a1f35116ad8 45809e136636fd6663e34fb341ed348bcd006.jpg" height="102" width="180"/>

<media:credit role="client" scheme="urn:feeds-wiredrive-com:credits"><![CDATA[Jell-O]]></media:credit>

<media:credit role="director" scheme="urn:feeds-wiredrive-com:credits"><![CDATA[Jerry Simpson]]></media:credit>

<media:credit role="agency" scheme="urn:feeds-wiredrive-com:credits"><![CDATA[CPB]]></media:credit>

<media:keywords><![CDATA[Chocolate, dessert, fruit, Jell-O, pudding]]></media:keywords></item>


any tips or help? I am stumped.

[edited by: eelixduppy at 1:18 pm (utc) on Apr 25, 2012]
[edit reason] fixed side scroll by adding spaces to URIs [/edit]

9:03 am on Apr 25, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



If you change the tags from self-close to explicit does it work? Just in case the xsi:nil is not set.
10:22 am on Apr 25, 2012 (gmt 0)

5+ Year Member



Unfortunately, I cannot change the feed in any way.
12:40 pm on Apr 25, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



See if the parsers you use, have an option to enable self-closed tags and try it.
7:51 pm on Apr 26, 2012 (gmt 0)

5+ Year Member



My solution was to use simplepie parser.
[simplepie.org...]

they have build in class for exactly this. get_thumbnail() and many others. Very good software and free.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month