Файл: public_html/rss.php
Строк: 29
<?php
include 'admin/config.php';
echo dbconn();
header('Content-Type: text/xml');
echo '
<rss version="2.0">
<channel>
<title>'.$configsitename.'</title>
<description>'.$configsitename.'</description>
<link>'.$configsiteurl.'</link>';
$get_articles = "SELECT * from rssarticles LIMIT 20";
$articles = mysql_query($get_articles) or die(mysql_error());
while ($article = mysql_fetch_array($articles)){
echo '
<item>
<title>'.$article["item_title"].'</title>
<description><![CDATA[
'.$article["item_content"].'
]]></description>
<link>'.$configsiteurl.'/article/'.$article["id"].'/'.$article["item_title"].'</link>
<pubDate>'.$article["item_date"].'</pubDate>
</item>';
}
echo '</channel>
</rss>';
?>