cannot get the CONTENT to work...
TITLE and LINK-HREF work but I can get no content to appear help!
Code below:
<?php
require("MagicParser.php");
function myRecordHandler($item)
{
global $counter;
print "<h2><a href='".$item["LINK-HREF"]."'>".$item["TITLE"]."</a></h2>";
print "<p>".$item["CONTENT"]."</p>";
$counter++;
return ($counter == 3);
}
MagicParser_parse("http://www.pricechecker.co.uk/blog/rss.xml","myRecordHandler","xml|FEED/ENTRY/");
?>
so it is !
couldn't see the wood for the trees!
Thanks
Hi,
I've just looked at the feed, and in that particular format there is no "CONTENT" field. Instead, the main body of each record is called "SUMMARY", so the following should work:
<?php
require("MagicParser.php");
function myRecordHandler($item)
{
global $counter;
print "<h2><a href='".$item["LINK-HREF"]."'>".$item["TITLE"]."</a></h2>";
print "<p>".$item["SUMMARY"]."</p>";
$counter++;
return ($counter == 3);
}
MagicParser_parse("http://www.pricechecker.co.uk/blog/rss.xml","myRecordHandler","xml|FEED/ENTRY/");
?>
Hope this helps!
Cheers,
David.