2 if ($Page->api) return;
3 header('Content-Type: application/atom+xml; charset=utf-8');
4 print '<?xml version="1.0" encoding="utf-8"?>';
5 $siteref = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'];
8 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
11 $search = new PageSearch();
12 foreach ($search->files() as $link) {
13 $article = new ArchiveArticle($link);
15 print "<loc>$siteref/{$article->link}</loc>";
18 $score -= substr_count($article->link, '/') + 1; # -10% per subdir
19 $age = time() - strtotime($article->dateiso);
20 $age /= 3600 * 24 * 365; # years
21 if ($age > .1) $score -= $age / 10 + .1; # -1% per year
23 printf('<priority>%.2f</priority>', $score / 10);
25 print "<lastmod>{$article->lastiso}</lastmod>";