From b1a885ac229892bac528e6fea4e011a1b240867b Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 10 Oct 2025 20:55:37 +0500 Subject: initial commit --- rss.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 rss.php (limited to 'rss.php') diff --git a/rss.php b/rss.php new file mode 100644 index 0000000..5a7c78c --- /dev/null +++ b/rss.php @@ -0,0 +1,49 @@ +query("SELECT * FROM statuses ORDER BY posted_at DESC"); +$statuses = $stmt->fetchAll(PDO::FETCH_ASSOC); + +header('Content-Type: application/xml'); + +echo ""; +echo ""; +echo ""; + +echo "ilt.su"; +echo "https://ilt.su"; +echo "ilotterytea's racist schizo thoughts. read and learn."; +echo "en-us"; + + +if (!empty($statuses)) { + $date = new DateTime($statuses[0]['posted_at']); + echo ""; + echo $date->format('D, d M Y H:i:s O'); + echo ""; +} + +foreach ($statuses as $s) { + $date = new DateTime($s['posted_at']); + + echo ""; + echo ""; + echo $s['title'] ?: '-NO TITLE-'; + echo ""; + + echo ''; + echo "https://ilt.su/statuses/?id=" . $s['id']; + echo ""; + + echo ""; + echo $date->format('D, d M Y H:i:s O'); + echo ""; + + echo ""; + echo ""; +} + +echo ""; +?> \ No newline at end of file -- cgit v1.2.3