4 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
\r
5 * Copyright (C) 2002-2004 The Nucleus Group
\r
7 * This program is free software; you can redistribute it and/or
\r
8 * modify it under the terms of the GNU General Public License
\r
9 * as published by the Free Software Foundation; either version 2
\r
10 * of the License, or (at your option) any later version.
\r
11 * (see nucleus/documentation/index.html#license for more info)
\r
13 * Nucleus Atom Syndication
\r
16 header("Pragma: no-cache");
\r
19 $CONF['Self'] = 'atom.php';
\r
21 include('./config.php');
\r
23 if (!$CONF['DisableSite']) {
\r
24 // get feed into $feed
\r
26 selectSkin('feeds/atom');
\r
28 $feed = ob_get_contents();
\r
31 // create ETAG (hash of feed)
\r
32 // (HTTP_IF_NONE_MATCH has quotes around it)
\r
33 $eTag = '"'.md5($feed).'"';
\r
34 header('Etag: '.$eTag);
\r
36 // compare Etag to what we got
\r
37 if ($eTag == serverVar('HTTP_IF_NONE_MATCH')) {
\r
38 header("HTTP/1.0 304 Not Modified");
\r
39 header('Content-Length: 0');
\r