I am reading this tutorial on fetching RSS feeds using PHP Simple XML.
Reason I wanna do it myself instead of Wordpress plugin is because of lack of displaying images.
Using this tutorial I thought I was going to be able to go through nodes myself and display what I want but I am not even fetching data I need because it is enclosed within ![CDATA]
:
<description>
<![CDATA[
<img src="http://images.highspeedbackbone.net/SKUimages/small/m17-1023-main666-tmc.jpg"/><br/> The Microsoft Office Home and Business 2010 Product Key Card brings together the roles of managing a business, running a household and helping with ho
]]>
</description>
So I am after that img
tag, but it's not there using this code from tutorial:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://rss.linksynergy.com/promo.rss?promoid=3076&token=8c86517642801a8d4e1132xxxxxxxxxxxxxxxx35e66a3');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
$xml = new SimpleXMLElement($data);
Any suggestions welcome.
Thanks!