2 header('Content-Type: application/atom+xml; charset=utf-8');
3 print '<?xml version="1.0" encoding="utf-8"?>';
4 $siteref = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'];
7 <feed xmlns="http://www.w3.org/2005/Atom">
8 <title>Lijtweg.nl</title>
9 <subtitle>Nieuwsberichten</subtitle>
10 <id><?= $siteref ?>/</id>
11 <link href="<?= $siteref ?>/" />
12 <link href="<?= $siteref . $_SERVER['REQUEST_URI'] ?>" rel="self" />
13 <author><name>Lijtweg</name></author>
15 $root = preg_replace('{/feed$}', '', $Page) . "/2???";
16 $pages = array_reverse(glob("$root/*.html"));
18 foreach ($pages as $i => $page) {
19 $article = new ArchiveArticle($page);
21 // feed metadata from top (most recent) article
22 print "\t<updated>{$article->lastiso}</updated>\n";
27 <id><?= $siteref . '/' . $article->link ?></id>
28 <link href="<?= $siteref . '/' . $article->link ?>" />
29 <title><?= $article->title ?></title>
30 <published><?= $article->dateiso ?></published>
31 <updated><?= $article->dateiso ?></updated>
33 if ($article->teaser) {
34 printf("\t\t<summary>%s</summary>\n", htmlspecialchars($article->teaser));
36 if ($article->thumb) {
37 printf("\t\t".'<link rel="enclosure" type="%s" href="%s"%s />'."\n",
39 "$siteref/{$article->thumb}",
40 file_exists($article->thumb) ? sprintf(' length="%d"', filesize($article->thumb)) : ''
44 <content type="html"><?= htmlspecialchars($article->story) ?>