3 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
\r
4 * Copyright (C) 2002-2012 The Nucleus Group
\r
6 * This program is free software; you can redistribute it and/or
\r
7 * modify it under the terms of the GNU General Public License
\r
8 * as published by the Free Software Foundation; either version 2
\r
9 * of the License, or (at your option) any later version.
\r
10 * (see nucleus/documentation/index.html#license for more info)
\r
14 * Nucleus Atom Syndication
\r
15 * @license http://nucleuscms.org/license.txt GNU General Public License
\r
16 * @copyright Copyright (C) 2002-2012 The Nucleus Group
\r
17 * @version $Id: atom.php 1388 2009-07-18 06:31:28Z shizuki $
\r
20 header('Pragma: no-cache');
\r
23 include('./config.php');
\r
25 if ( !$CONF['DisableSite'] )
\r
27 // get feed into $feed
\r
29 selectSkin('feeds/atom');
\r
31 $feed = ob_get_contents();
\r
34 // create ETAG (hash of feed)
\r
35 // (HTTP_IF_NONE_MATCH has quotes around it)
\r
36 $eTag = '"' . md5($feed) . '"';
\r
37 header('Etag: ' . $eTag);
\r
39 // compare Etag to what we got
\r
40 if ( $eTag == serverVar('HTTP_IF_NONE_MATCH') )
\r
42 header('HTTP/1.0 304 Not Modified');
\r
43 header('Content-Length: 0');
\r