Hi
I tested Google News on your site used the standard code and get the following:
Array ( [ITEM] => [TITLE] => CCTV website rebuked over YouTube clip - Telegraph.co.uk [LINK] => http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNG2n7-HuR9JiqQyljgRikPJCwjmmA&url=http://www.telegraph.co.uk/technology/news/8575514/CCTV-website-rebuked-over-YouTube-clip.html [GUID] => tag:news.google.com,2005:cluster=http://www.telegraph.co.uk/technology/news/8575514/CCTV-website-rebuked-over-YouTube-clip.html [GUID-ISPERMALINK] => false [PUBDATE] => Tue, 14 Jun 2011 15:57:17 GMT+00:00 [DESCRIPTION] =>
Then a bit of the feed and then
) CCTV website rebuked over YouTube clip - Telegraph.co.ukhttp://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNG2n7-HuR9JiqQyljgRikPJCwjmmA&url=http://www.telegraph.co.uk/technology/news/8575514/CCTV-website-rebuked-over-YouTube-clip.htmltag:news.google.com,2005:cluster=http://www.telegraph.co.uk/technology/news/8575514/CCTV-website-rebuked-over-YouTube-clip.htmlfalseTue, 14 Jun 2011 15:57:17 GMT+00:00
Is there any reason for this.
MagicParser_parse("http://news.google.com/news?q=cctv&output=rss","myRecordHandler","xml|RSS/CHANNEL/ITEM/");
Thanks
Roy
Hi Roy,
It's quite normal for the description fields of RSS feeds to contain HTML markup, I think that's all you're seeing here, so it should work fine simply by using
print $record["DESCRIPTION"];
Don't forget you can also remove HTML using strip_tags() if required.
Cheers,
David.