I have problem with rss feed I have made with PHP
Firefox is understanding my code and displayes the feed, but rss validators and IE8 are not working with it
Here is my code:
Code: Select all
<?php
require("dbconnect.php");
//
else
{
$website_URLq=MYSQL_FETCH_ARRAY(mysql_query("SELECT * FROM settings WHERE set_name='website_URL' "));
$website_URL=$website_URLq['set_value'];
header("Content-Type: application/rss+xml; charset=ISO-8859-1");
echo ('<?xml version="1.0" encoding="ISO-8859-1" ?>');
?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>website title RSS FEED</title>
<link>http://mywebsite.net</link>
<description>The newest changes to customers and orders.</description>
<atom:link href="<?php echo $website_URL;?>/rss_feed.php" rel="self" type="application/rss+xml" />
<?php
$result=mysql_query("SELECT * FROM feed ORDER BY id DESC LIMIT 20 ");
while($row=mysql_fetch_array($result)){
//some php code here
$item="<item>
<guid isPermaLink='false'>$guide</guid>
<title>$title</title>
<link>$link</link>
<description>$desc</description>
</item>";
echo $item;
}
}
?>
</channel>
</rss></channel>
</rss>
are the first things they see and return parse error
Could anyone help me solve this problem?
Thanks in advance