diff options
Diffstat (limited to 'rss.php')
-rw-r--r-- | rss.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/rss.php b/rss.php new file mode 100644 index 0000000..4b710aa --- /dev/null +++ b/rss.php | |||
@@ -0,0 +1,33 @@ | |||
1 | <?php | ||
2 | |||
3 | include('includes/db.php'); | ||
4 | include('includes/update.php'); | ||
5 | |||
6 | echo('<?xml version="1.0"?>'); | ||
7 | |||
8 | ?> | ||
9 | <rss version="2.0"> | ||
10 | <channel> | ||
11 | <title>Pillowcase</title> | ||
12 | <link>http://pillowcase.fourisland.com/</link> | ||
13 | <description>pillowcase - the result of an obsession with cute, plush objects that talk nonsense</description> | ||
14 | <language>en-us</language> | ||
15 | <?php | ||
16 | |||
17 | $getitems = "SELECT * FROM comics WHERE status = \"publish\" ORDER BY comic_id DESC LIMIT 0,10"; | ||
18 | $getitems2 = mysql_query($getitems); | ||
19 | while ($getitems3 = mysql_fetch_array($getitems2)) | ||
20 | { | ||
21 | ?> | ||
22 | <item> | ||
23 | <title><?php echo($getitems3['title']); ?></title> | ||
24 | <link>http://pillowcase.fourisland.com/comic<?php echo($getitems3['comic_id']); ?>.htm</link> | ||
25 | <description><![CDATA[<IMG SRC="http://pillowcase.fourisland.com/images/comics/<?php echo($getitems3['filename']); ?> ALT="<?php echo($getitems3['title']); ?>"><p><?php echo($getitems3['text']); ?></p>]]></description> | ||
26 | <pubDate><?php echo(date('D, d M Y H:i:s O',strtotime($getitems3['pubDate']))); ?></pubDate> | ||
27 | </item> | ||
28 | <?php | ||
29 | } | ||
30 | |||
31 | ?> | ||
32 | </channel> | ||
33 | </rss> | ||