bug 1173: corrected output, missing s with sprintf
[cacert-devel.git] / www / rss.php
1 <? header("location: http://blog.CAcert.org/feed/"); exit; ?>
2 <? /* <author>$row['who'] &lt;nomail@nospam.sss&gt;</author> */ ?>
3 <? header("Content-Type: application/xml");
4 ?><<?="?"?>xml version="1.0" encoding="UTF-8" <?="?"?>>
5 <rss version="2.0">
6 <channel>
7 <title>CAcert.org NEWS!</title>
8 <link>http://www.CAcert.org/</link>
9 <copyright>Copyright &#169; 2002-present, CAcert Inc.</copyright>
10 <description>News feed for CAcert.org</description>
11 <pubDate><?=date("D, d M Y H:i:s O")?></pubDate>
12 <lastBuildDate><?=date("D, d M Y H:i:s O")?></lastBuildDate>
13 <ttl>3600</ttl><?
14 $query = "select *, UNIX_TIMESTAMP(`when`) as `TS` from news order by `when` desc limit 10";
15 $res = mysql_query($query);
16 while($row = mysql_fetch_assoc($res))
17 { ?>
18 <item>
19 <title><?=strip_tags($row['short'])?></title>
20 <description><?=strip_tags($row['story'])?></description>
21 <link>http://www.cacert.org/news.php?from=rss&amp;id=<?=$row['id']?></link>
22 <pubDate><?=date("D, d M Y H:i:s O", $row['TS'])?></pubDate>
23 </item>
24 <? } ?>
25
26 </channel>
27 </rss>