mirror of
https://github.com/scummvm/scummvm-web.git
synced 2026-06-20 05:45:49 +00:00
stable and valid RSS 2.0 and ATOM 1.0 Feed. Tested with Firefox, Thunderbird and Akregator. Regards to the RSS 2.0 specification, an email is required for the author field. So nospam@scummvm.org is used by default. svn path=/web/trunk/; revision=24189
39 lines
1.4 KiB
PHP
39 lines
1.4 KiB
PHP
<?php
|
|
$file_root = ".";
|
|
|
|
// load specific libraries
|
|
require($file_root."/include/"."util.php");
|
|
require($file_root."/include/"."news.php");
|
|
|
|
header("Content-Type: text/xml; charset=UTF-8");
|
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
|
|
?>
|
|
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
<channel>
|
|
<title>ScummVM news</title>
|
|
<link>http://www.scummvm.org/</link>
|
|
<description>ScummVM is a cross-platform interpreter for several point-and-click adventure engines. This includes all SCUMM-based adventures by LucasArts, Simon the Sorcerer 1&2 by AdventureSoft, Beneath a Steel Sky and Broken Sword 1&2 by Revolution, and many more.</description>
|
|
<language>en</language>
|
|
|
|
<?php
|
|
|
|
// Fetch news (only show the first 5 records)
|
|
$news = list_latest_news(5);
|
|
|
|
// Display news items
|
|
while (list($key,$item) = each($news)) {
|
|
$news_url = "http://www.scummvm.org/?shownews=archive#".date("Y-m-d",$item["date"]);
|
|
echo "\t\t<item>\n";
|
|
echo "\t\t\t<title><![CDATA[".$item["title"]."]]></title>\n";
|
|
echo "\t\t\t<description><![CDATA[\n".$item["body"]."\n\t\t\t]]></description>\n";
|
|
echo "\t\t\t<pubDate>".date("r",$item["date"])."</pubDate>\n";
|
|
echo "\t\t\t<author>nospam@scummvm.org (".$item["author"].")</author>\n";
|
|
echo "\t\t\t<guid isPermaLink=\"true\">".$news_url."</guid>\n";
|
|
echo "\t\t\t<link>".$news_url."</link>\n";
|
|
echo "\t\t</item>\n";
|
|
} // end of news loop
|
|
?>
|
|
|
|
</channel>
|
|
</rss>
|