2 require_once __DIR__ . '/../data/config.php';
3 require_once __DIR__ . '/functions.php';
4 header('Content-type: application/atom+xml');
5 header('Link: <' . $hub . '>; rel="hub"');
6 header('Link: <' . $self . 'feed.php>; rel="self"', false);
8 $articles = loadArticles();
10 $lastUpdate = key($articles);
12 <?xml version="1.0" encoding="utf-8" ?>
13 <feed xmlns="http://www.w3.org/2005/Atom">
14 <title>WebSub tester</title>
19 <link href="<?php echo $self; ?>"/>
20 <link rel="self" href="<?php echo $self; ?>feed.php"/>
21 <link rel="hub" href="<?php echo $hub; ?>"/>
22 <link rel="license" type="text/html" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" />
23 <id><?php echo $self; ?>feed.php</id>
24 <updated><?php echo date('c', $lastUpdate); ?></updated>
26 <?php foreach ($articles as $article) { ?>
28 <id><?php echo $article->file; ?></id>
29 <title><?php echo htmlspecialchars($article->title); ?></title>
30 <published><?php echo date('c', $article->time); ?></published>
31 <updated><?php echo date('c', $article->time); ?></updated>
32 <summary><?php echo substr($article->content, 0, 100); ?>…</summary>
33 <content type="xhtml">
34 <div xmlns="http://www.w3.org/1999/xhtml">
35 <?php echo $article->content; ?>
38 <link rel="alternate" type="text/html" href="<?php echo $self . $article->file; ?>" />