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