Hey guys, Okay you solved my problem last time but this one is really tough. Okay in an rss feed like metacafe (http://feeds.feedburner.com/metacafe/TYps) there exists the .swf file for each video. <media:content url="http://www.metacafe.com/fplayer/435885/car_vs_motorcycle_vs_firefighter.swf" type="application/x-shockwave-flash" medium="video" height="345" width="400" duration="46" /> <media:player url="http://www.metacafe.com/watch/435885/car_vs_motorcycle_vs_firefighter/" /> <media:thumbnail url="http://images.metacafe.com/thumb/435885/3051265/4/rss_feed5/0/car_vs_motorcycle_vs_firefighter.jpg" width="170" height="138" /> <media:title>CAR VS Motorcycle VS FireFighter</media:title> <media:keywords>porsche,r1,drift,cars,speed,drag,race,motorcycle,motorbike</media:keywords> <media:credit>Juan Roman Riquelme</media:credit> Code (markup): Now I want to get http://www.metacafe.com/fplayer/435885/car_vs_motorcycle_vs_firefighter.swf from the media:content url="" field. PROBLEM: Magpie seems to not like this kind of tags. It likes <tag>value</tag> so that you can just use: $string = $item['tag']; Magpie also just likes to cut out the : part of it and just call it media. I did this: $string = $item['media']; and got Array. Because magpie doesn't support this kind of tags (which I think is so stupid). Can I extract this information in any other way. I tried pregmatch it but either it couldn't or I wasn't doing it right. I would appreciate all your ideas. Thanks Skinny
Hey Skinny, I don't have any experience with Magpie RSS, but this may be what you are looking to do: $string = $item['media']['content']; Code (markup): This is from their website: $rss->items is an array of associative arrays, each one describing a single item. An example that looks like: <item rdf:about="http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257"> <title>Weekly Peace Vigil</title> <link>http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257</link> <description>Wear a white ribbon</description> <dc:subject>Peace</dc:subject> <ev:startdate>2002-06-01T11:00:00</ev:startdate> <ev:location>Northampton, MA</ev:location> <ev:enddate>2002-06-01T12:00:00</ev:enddate> <ev:type>Protest</ev:type> </item> Is parsed, and pushed on the $rss->items array as: array( title => 'Weekly Peace Vigil', link => 'http://protest.net/NorthEast/calendrome.cgi?span=event&ID=210257', description => 'Wear a white ribbon', dc => array ( subject => 'Peace' ), ev => array ( startdate => '2002-06-01T11:00:00', enddate => '2002-06-01T12:00:00', type => 'Protest', location => 'Northampton, MA' ) ); Code (markup): Hope this is helpful and what you were looking for.
Sorry to bump this old post but I need the same thing and still cannot find an answer. Has anybody found one?