merge of '0d12a42d751e597b06de72de2f533edced3f924b'
[vuplus_openembedded] / contrib / angstrom / rss.php
1 <?php echo ('<?xml version="1.0" encoding="utf-8"?>'); ?>
2 <rss version="2.0" xml:base="http://www.angstrom-distribution.org/unstable/autobuild/" xmlns:dc="http://purl.org/dc/elements/1.1/">
3         <channel>
4                 <title>Ångström autobuilder updates</title>
5                 <link>http://www.angstrom-distribution.org/unstable/autobuild/</link>
6                 <description></description>
7                 <language>en</language>
8 <?php
9
10 $base_path = "/home/angstrom/website/unstable/autobuild";
11
12 if ($handle = opendir("$base_path")) 
13 {
14         while (false !== ($file = readdir($handle))) 
15         {
16                 if(!(is_dir($file) && $file != "." && $file != ".."))
17                 {
18                         continue;
19                 }
20
21                 $second_handle = opendir("$base_path/$file/");
22
23                 while (false !== ($file2 = readdir($second_handle))) 
24                 {
25                         if(is_file("/$base_path/$file/$file2")) 
26                         { 
27                                 $fmtime = filemtime("$file/$file2");
28
29                                 echo "<item>\n"
30                                 echo "<title>$file/$file2 uploaded</title>\n";
31                                 echo " <link>http://www.angstrom-distribution.org/unstable/autobuild/$file/$file2</link>\n";
32
33                                 $rsstime = strftime("%a, %d %b %Y %T +0100", $fmtime);
34
35                                 echo "<pubDate>$rsstime</pubDate>\n";
36                                 echo "<dc:creator>Angstrom autobuilder</dc:creator>";
37                                 echo "</item>\n";
38                         }
39                 }
40
41                 closedir($second_handle);
42         }
43
44         closedir($handle);
45 }
46 ?>
47         </channel>
48 </rss>