summaryrefslogtreecommitdiff
path: root/contrib/angstrom/rss.php
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/angstrom/rss.php')
-rw-r--r--contrib/angstrom/rss.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/contrib/angstrom/rss.php b/contrib/angstrom/rss.php
new file mode 100644
index 0000000000..cf5a9e0218
--- /dev/null
+++ b/contrib/angstrom/rss.php
@@ -0,0 +1,48 @@
+<?php echo ('<?xml version="1.0" encoding="utf-8"?>'); ?>
+<rss version="2.0" xml:base="http://www.angstrom-distribution.org/unstable/autobuild/" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <channel>
+ <title>Ångström autobuilder updates</title>
+ <link>http://www.angstrom-distribution.org/unstable/autobuild/</link>
+ <description></description>
+ <language>en</language>
+<?php
+
+$base_path = "/home/angstrom/website/unstable/autobuild";
+
+if ($handle = opendir("$base_path"))
+{
+ while (false !== ($file = readdir($handle)))
+ {
+ if(!(is_dir($file) && $file != "." && $file != ".."))
+ {
+ continue;
+ }
+
+ $second_handle = opendir("$base_path/$file/");
+
+ while (false !== ($file2 = readdir($second_handle)))
+ {
+ if(is_file("/$base_path/$file/$file2"))
+ {
+ $fmtime = filemtime("$file/$file2");
+
+ echo "<item>\n"
+ echo "<title>$file/$file2 uploaded</title>\n";
+ echo " <link>http://www.angstrom-distribution.org/unstable/autobuild/$file/$file2</link>\n";
+
+ $rsstime = strftime("%a, %d %b %Y %T +0100", $fmtime);
+
+ echo "<pubDate>$rsstime</pubDate>\n";
+ echo "<dc:creator>Angstrom autobuilder</dc:creator>";
+ echo "</item>\n";
+ }
+ }
+
+ closedir($second_handle);
+ }
+
+ closedir($handle);
+}
+?>
+ </channel>
+</rss>