Side navigation
Ticket #4764: if_modified_since.php
File if_modified_since.php, 0.3 KB (added by lawrencepit, June 15, 2009 07:26AM UTC)
<?php
error_reporting(0);
$ts = $_REQUEST['ts'];
$ifModifiedSince = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE']) : false;
if ($ifModifiedSince == $ts) {
header('HTTP/1.0 304 Not Modified');
die; // stop processing
}
header("Last-Modified: " . $ts);
echo "OK: " . $ts;
?>
Download in other formats:
Original Format
File if_modified_since.php, 0.3 KB (added by lawrencepit, June 15, 2009 07:26AM UTC)
<?php
error_reporting(0);
$ts = $_REQUEST['ts'];
$ifModifiedSince = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE']) : false;
if ($ifModifiedSince == $ts) {
header('HTTP/1.0 304 Not Modified');
die; // stop processing
}
header("Last-Modified: " . $ts);
echo "OK: " . $ts;
?>