summaryrefslogtreecommitdiff
path: root/www/rss.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/rss.php')
-rw-r--r--www/rss.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/www/rss.php b/www/rss.php
new file mode 100644
index 0000000..f8eddb7
--- /dev/null
+++ b/www/rss.php
@@ -0,0 +1,27 @@
+<? header("location: http://blog.CAcert.org/feed/"); exit; ?>
+<? /* <author>$row['who'] &lt;nomail@nospam.sss&gt;</author> */ ?>
+<? header("Content-Type: application/xml");
+?><<?="?"?>xml version="1.0" encoding="UTF-8" <?="?"?>>
+<rss version="2.0">
+ <channel>
+ <title>CAcert.org NEWS!</title>
+ <link>http://www.CAcert.org/</link>
+ <copyright>Copyright &#169; 2002-present, CAcert Inc.</copyright>
+ <description>News feed for CAcert.org</description>
+ <pubDate><?=date("D, d M Y H:i:s O")?></pubDate>
+ <lastBuildDate><?=date("D, d M Y H:i:s O")?></lastBuildDate>
+ <ttl>3600</ttl><?
+ $query = "select *, UNIX_TIMESTAMP(`when`) as `TS` from news order by `when` desc limit 10";
+ $res = mysql_query($query);
+ while($row = mysql_fetch_assoc($res))
+ { ?>
+ <item>
+ <title><?=strip_tags($row['short'])?></title>
+ <description><?=strip_tags($row['story'])?></description>
+ <link>http://www.cacert.org/news.php?from=rss&amp;id=<?=$row['id']?></link>
+ <pubDate><?=date("D, d M Y H:i:s O", $row['TS'])?></pubDate>
+ </item>
+<? } ?>
+
+ </channel>
+</rss>