Hi all,
I’ve re-engineered my PHP script to produce a RSS XML file.
The RSS file validates fine via http://validator.w3.org/feed/check.cgi
Unfortunately images don’t show for some reason and I can’t quite pin down why.
The part of the RSS which displays the image is this:
<description><p><img src=“http://www.yootheme.com/images/stories/blog/news_zoo21.jpg” width=“200” height=“200” align=“middle” /></p> </description>
The header of the RSS which I’m writing is as:
fwrite($rss_data_write, "<?xml version=‘1.0’ encoding=‘iso-8859-1’?>\r
");
fwrite($rss_data_write, "<rss version=‘2.0’ xmlns:blogChannel=‘http://backend.userland.com/blogChannelModule’>\r
");
fwrite($rss_data_write, "<channel>\r
“);
fwrite($rss_data_write, “<title>” .$rss_title .”</title>\r
“);
fwrite($rss_data_write, “<link>http://” .$rss_site .”</link>\r
“);
fwrite($rss_data_write, “<description>” .$rss_description .”</description>\r
“);
fwrite($rss_data_write, “<language>” .$rss_language .”</language>\r
“);
fwrite($rss_data_write, “<copyright>http://” .$rss_site .”</copyright>\r
“);
fwrite($rss_data_write, “<lastBuildDate>” .$rss_pubdate .”</lastBuildDate>\r
");
fwrite($rss_data_write, "<docs>[B]http://backend.userland.com/rss[/B]</docs>\\r\
“);
fwrite($rss_data_write, “<generator>Generated by " .$rss_site_name .” " .$rss_site .”</generator>\r
“);
fwrite($rss_data_write, “<managingEditor>” .$rss_editor_email .”</managingEditor>\r
");
fwrite($rss_data_write, "\r
");
As far as I’m aware the above code is valid and should display the image in img src etc.
I’ve compared the code to other RSS feeds and it would seem I’m doing nothing wrong…in theory.
I’m inclined to believe that either the namespace is being defined problematically or somehow chars are getting inserted somehow which somehow makes any RSS reader fall over when displaying an image.
In IE8 the RSS field yields an image placeholder as if the link was invalid (except it’s not), in other RSS reader it simply doesn’t display the image at all.
Any RSS experts out there that can spot the problem?
Thanks,