Location: PHPKode > scripts > WH Board > wh_board/feeds/blog_rss.php
<?php header("Content-type: text/xml"); echo '<'.'?xml version="1.0" encoding="ISO-8859-1"?'.'>'; ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

<?php

    define('CONFIG_CHECK', 1);
    define('MYSQL_CHECK', 1);
    define('SECURE_CHECK', 1);

    require('../framework/config.php');
    require('../framework/mysql.php');
    include_once('../framework/cache.php'); no_cache();

    if($language == "de") {
		require('../language/de.php');

	}elseif($language == "en") {
		require('../language/en.php');
		}

?>

<channel>
    <title><?php echo $title; ?></title>
    <language>de</language>
    <link><?php echo $url; ?></link>
    <description><?php echo 'Die ' . $rsslimit . ' ' . $lang['rss_newest_articles'] . ''; ?></description>
    <copyright>Copyright <?php echo $url; ?></copyright>
    <webMaster><?php echo $webmaster; ?></webMaster>
	<atom:link href="<?php echo $forum; ?>feeds/blog_rss.php" rel="self" type="application/rss+xml" />

<?php

	$query = "SELECT
				 blog_id,
				 blog_title,
				 blog_author,
				 blog_post,
				 blog_date
			  FROM
			  	 articles
			  ORDER BY
				 blog_id DESC
			  LIMIT
				 " . $rsslimit;
	
	$result = mysql_query($query, $connect) OR die(mysql_error()); 

	while($row = mysql_fetch_array($result)) {
		  $id = (int)$row['blog_id'];
		  $author = $row['blog_author'];
		  $title = $row['blog_title'];
		  $content = $row['blog_post'];
		  $pubdate = strtotime($row['blog_date']);
		  $pubdate = date(r, $pubdate);

?>
	<item>
		<title><?php echo $title; ?></title>
	    <link><?php echo $blog; ?></link>
	   	<guid isPermaLink="false"><?php echo $blog; ?></guid>
	   	<author><?php echo $author; ?></author>
	    <pubDate><?php echo $pubdate; ?></pubDate>
	    <description><![CDATA[ <?php echo nl2br($content); ?> ]]></description>
	</item>
<?php } ?>

</channel>
</rss>

<?php include_once('../framework/configure/end.php'); ?>
Return current item: WH Board