Rev 424 |
Rev 433 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?php
require '../_taios.php';
$page = new Taios_Page
('Blog RSS Feed', '../');
write
('<?xml version="1.0" encoding="UTF-8" ?>');
write
('<rss version="2.0">');
write
('<channel>');
write
('<title>Tim32 Blog RSS</title>');
write
('<description>This is the RSS feed for the Tim32 Blog.</description>');
write
('<link>http://tim32.org/blog/</link>');
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1 ORDER BY DatePosted DESC');
for ($i = 0; $i < count($ids); $i++)
{
$id = $ids[$i];
$post = $page->getBlogPost($id);
write
('<item>');
write
('<title>' . $post->title . '</title>');
write
('<link>http://tim32.org/blog/post.php?id=' . $id . '</link>');
write
('<guid>' . $id . '</guid>');
write
('<pubDate>' . date('D, d M Y H:i:s O', $post->datePosted). '</pubDate>');
write
('<description>' . str_replace(">", ">", str_replace("<", "<", $page->replaceBBCode($post->content))) . '</description>');
write
('</item>');
}
write
('</channel>');
write
('</rss>');
?>