?> <feed xmlns="http://www.w3.org/2005/Atom"> <id>urn:<?php echo str_replace('.', '-', $_SERVER['HTTP_HOST']) . ":feeds:atom"; ?> </id> <title><?php echo rss_header_title(); ?> </title> <subtitle><?php echo rss_header_title(); ?> </subtitle> <link rel="alternate" type="text/html" href="<?php echo guessTransportProto() . $_SERVER['HTTP_HOST'] . getPath(); ?> " /> <link rel="self" type="text/xml" href="<?php echo guessTransportProto() . $_SERVER['HTTP_HOST'] . getPath(); ?> ?media=atom"/> <updated><?php echo rss_date('c', getLastModif()); ?> </updated> <?php rss_main_object(); ?> </feed>
function preRender() { _pf('Header preRender()'); if (!($this->options & HDR_NO_CACHECONTROL) && getConfig('rss.output.cachecontrol')) { $etag = getETag(); $hdrs = rss_getallheaders(); if (array_key_exists('If-None-Match', $hdrs) && $hdrs['If-None-Match'] == $etag) { header("HTTP/1.1 304 Not Modified"); flush(); exit; } else { header('Last-Modified: ' . gmstrftime("%a, %d %b %Y %T %Z", getLastModif())); header("ETag: {$etag}"); } } if (count($this->extraHeaders)) { foreach ($this->extraHeaders as $hdr) { header($hdr); } } rss_plugin_hook('rss.plugins.bodystart', null); }
function rss_footer_last_modif() { $ts = getLastModif(); return $ts ? rss_locale_date("%c", $ts) : __('Never'); }
function getETag() { return md5(getLastModif() . $_SERVER['PHP_SELF']); }