Location: PHPKode > projects > MJGUEST > mjguest/guestbook.rss.php
<?php

	/*
	+---------------------------------------------------------------
	|
	|	MJGUEST
	|	============================================================
	|	Copyright (c) 2002-2008 Giacomo "mdsjack" Menni
	|	Terms of agreement and support at www.mdsjack.bo.it
	|
	+---------------------------------------------------------------
	|	[ CORE MODULE ]
	|	RSS 2.0 Guestbook feed generator
	+---------------------------------------------------------------
	*/
	
	ob_start();
	
	header("Content-Type: text/xml; charset=UTF-8");
	
	define('mjguest_basedir', false);
	
	require ('mjguest.core.php');
	
	$mjguest = new guestbook;
	
	$mjguest->entry->get_set(0, 10);
	
	echo '<?xml version="1.0" encoding="UTF-8" ?>';
?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title><?php echo $mjguest->gui->say['guestbook'] ?></title>
	<link>http://<?php echo $_SERVER['HTTP_HOST'], dirname($_SERVER['PHP_SELF']) ?>/mjguest.php</link>
	<atom:link href="http://<?php echo $_SERVER['HTTP_HOST'], dirname($_SERVER['PHP_SELF']) ?>/guestbook.rss.php" rel="self" type="application/rss+xml" />
	<category>Guestbook</category>
	<lastBuildDate><?php echo gmdate('r') ?></lastBuildDate>
	<description><![CDATA[<?php echo $mjguest->settings->param['title'] ?>]]></description>
	<copyright><![CDATA[ MJGUEST - Copyright (c) 2002-2008 www.mdsjack.bo.it ]]></copyright>
<?php
	while ($mjguest->entry->get_each('rss')):
?>
	<item>
		<guid isPermaLink="false">Entry #<?php echo $mjguest->entry->detail['id'] ?></guid>
		<title><![CDATA[ <?php echo $mjguest->entry->detail['title'] ?>... ]]></title>
		<link>http://<?php echo $_SERVER['HTTP_HOST'], dirname($_SERVER['PHP_SELF']) ?>/mjguest.php</link>
		<author><?php echo $mjguest->entry->detail['email'], ' (', $mjguest->entry->detail['name'] ?>)</author>
		<pubDate><?php echo $mjguest->entry->detail['datetime'] ?></pubDate>
		<description><![CDATA[<?php echo $mjguest->entry->detail['message'] ?>]]></description>
	</item>
<?php endwhile ?>
</channel>
</rss>
<?php

	ob_end_flush();
	
	unset($mjguest);
?>
Return current item: MJGUEST