graham23s Posted October 10, 2008 Share Posted October 10, 2008 Hi Guys, my rss feed is located: http://www.firstchoicepharmacy.co.uk/rss-feed.php but isn't displaying without errors! my code is: <?php include("inc/inc-dbconnection.php"); header('Content-type: text/xml'); ?> <rss version="2.0"> <channel> <title>Firstchoicepharmacy.co.uk</title> <description>First Choice Pharmacy - Cheap Online UK Pharmacy</description> <link>http://www.firstchoicepharmacy.co.uk/</link> <copyright>(c) 2008 Firstchoicepharmacy.co.uk</copyright> <?php $q_rss = "SELECT * FROM `fcp_products` ORDER BY `date_added` DESC LIMIT 30"; $r_rss = mysql_query($q_rss); while ($a_rss = mysql_fetch_array($r_rss)) { // vars $rss_id = $a_rss['id']; $rss_nm = htmlentities($a_rss['product_name']); $rss_de = htmlspecialchars($a_rss['product_description']); $rss_dt = $a_rss['date_added']; ?> <item> <title><?php print("$rss_nm"); ?></title> <description><?php print("$rss_de"); ?></description> <link>http://www.firstchoicepharmacy.co.uk/product-information.php?productid=<?php print("$rss_id"); ?></link> <pubDate><?php print("$rss_dt"); ?></pubDate> </item> <?php } ?> </channel> </rss> i think i know the problem! it works sometimes but not others! im sure the feed is pulling out the text! but it has characters like ' and such that the feed sees as errors! im not sure how to fix it any help would be great cheers Graham Link to comment https://forums.phpfreaks.com/topic/127895-rss-feed-failure/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.