diff options
| author | sillylaird <sillyfanboy@gmail.com> | 2026-09-03 00:33:59 +0000 |
|---|---|---|
| committer | sillylaird <sillyfanboy@gmail.com> | 2026-09-03 00:33:59 +0000 |
| commit | 898b52edcb47bcb3e9d6106e74ca73e74ea01e70 (patch) | |
| tree | 85c6ee5ad58b860144551184d4cf86b560c62b91 /changelog/rss.xml | |
| download | www-main.tar.gz www-main.zip | |
Diffstat (limited to '')
| -rwxr-xr-x | changelog/rss.xml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/changelog/rss.xml b/changelog/rss.xml new file mode 100755 index 0000000..7a72398 --- /dev/null +++ b/changelog/rss.xml @@ -0,0 +1,30 @@ +<?php +require __DIR__ . '/db.html'; +header("Content-Type: application/rss+xml; charset=UTF-8"); +echo '<?xml version="1.0" encoding="UTF-8"?>'; +?> +<rss version="2.0"> +<channel> +<title>SillyLaird Changelog</title> +<link>https://www.sillylaird.ca/changelog/</link> + +<?php +$stmt = $db->query(" + SELECT title, body, created_at + FROM changelog + ORDER BY created_at DESC + LIMIT 20 +"); +while ($e = $stmt->fetch(PDO::FETCH_ASSOC)): +?> +<item> +<title><?= htmlspecialchars($e['title']) ?></title> +<pubDate><?= date(DATE_RSS, strtotime($e['created_at'])) ?></pubDate> +<description><![CDATA[ +<?= nl2br(htmlspecialchars($e['body'])) ?> +]]></description> +</item> +<?php endwhile; ?> + +</channel> +</rss> |
