| [ PHPXref.com ] | [ Generated: Sun Jul 20 16:40:17 2008 ] | [ BLOG:CMS 4.1.3 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * BLOG:CMS: PHP/MySQL Personal Content Management System (CMS) 4 * http://blogcms.com/ 5 * ---------------------------------------------------------------- 6 * 7 * Copyright (C) 2003-2005 Radek HULÁN 8 * http://hulan.cz/contact/ 9 * 10 * Based on: 11 * ---------------------------------------------------------------- 12 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/) 13 * Copyright (C) 2002-2003 The Nucleus Group 14 * 15 * ---------------------------------------------------------------- 16 * This program is free software; you can redistribute it and/or 17 * modify it under the terms of the GNU General Public License 18 * as published by the Free Software Foundation; either version 2 19 * of the License, or (at your option) any later version. 20 **/ 21 22 header("Pragma: no-cache"); 23 $CONF = array(); 24 include('cfg.php'); 25 if (!$CONF['DisableSite']) { 26 // get feed into $feed 27 ob_start(); 28 selectSkin('xmlrss2'); 29 selector(); 30 $feed = ob_get_contents(); 31 ob_end_clean(); 32 33 // create ETAG (hash of feed) 34 // (HTTP_IF_NONE_MATCH has quotes around it) 35 $eTag = '"'.md5($feed).'"'; 36 header('Etag: '.$eTag); 37 38 // compare Etag to what we got 39 if ($eTag == serverVar('HTTP_IF_NONE_MATCH')) { 40 header("HTTP/1.0 304 Not Modified"); 41 header('Content-Length: 0'); 42 } else { 43 // dump feed 44 echo $feed; 45 } 46 47 } else { 48 echo '<' . '?xml version="1.0" encoding="utf-8"?' . '>'; 49 ?> 50 <rss version="2.0"> 51 <channel> 52 <title><?php echo htmlspecialchars($CONF['SiteName'])?></title> 53 <link><?php echo htmlspecialchars($CONF['IndexURL'])?></link> 54 <description></description> 55 <docs>http://backend.userland.com/rss</docs> 56 </channel> 57 </rss> 58 <?php 59 } 60 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |