4 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5 * Copyright (C) 2002-2006 The Nucleus Group
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 * (see nucleus/documentation/index.html#license for more info)
15 * Nucleus RSS syndication channel skin
16 * @license http://nucleuscms.org/license.txt GNU General Public License
17 * @copyright Copyright (C) 2002-2006 The Nucleus Group
18 * @version $Id: xml-rss2.php,v 1.7 2006-07-17 19:59:46 kimitake Exp $
19 * $NucleusJP: xml-rss2.php,v 1.6 2006/07/12 07:11:45 kimitake Exp $
22 header("Pragma: no-cache");
25 $CONF['Self'] = "xml-rss2.php";
27 include('./config.php');
29 if (!$CONF['DisableSite']) {
30 // get feed into $feed
32 selectSkin('feeds/rss20');
34 $feed = ob_get_contents();
37 // create ETAG (hash of feed)
38 // (HTTP_IF_NONE_MATCH has quotes around it)
39 $eTag = '"'.md5($feed).'"';
40 header('Etag: '.$eTag);
42 // compare Etag to what we got
43 if ($eTag == serverVar('HTTP_IF_NONE_MATCH')) {
44 header("HTTP/1.0 304 Not Modified");
45 header('Content-Length: 0');
47 header("Content-Type: application/xml");
53 // output empty RSS file...
54 // (because site is disabled)
56 echo '<' . '?xml version="1.0" encoding="ISO-8859-1"?' . '>';
61 <title><?php echo htmlspecialchars($CONF['SiteName'])?></title>
62 <link><?php echo htmlspecialchars($CONF['IndexURL'])?></link>
63 <description></description>
64 <docs>http://backend.userland.com/rss</docs>