Welcome to WebmasterWorld Guest from 220.127.116.11 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
RSS displaying attributes Correct way to get RSS feed attributes. mhulbrock 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]
If you change the tags from self-close to explicit does it work? Just in case the xsi:nil is not set. mhulbrock
Unfortunately, I cannot change the feed in any way. enigma1
See if the parsers you use, have an option to enable self-closed tags and try it. mhulbrock
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.