Last_Modified

Вы здесь

session_start();
if(!isset($_SESSION['random_code']))
	$_SESSION['random_code'] = mt_rand(100000,1000000);
?>
<?header("Last-Modified: " . date("r", time()-432000));?>
<?header("Expires: " . date("r", time()+432000));?> 
<?
$Last_Modified = @date ( 'D, d M Y H:i:00' , time () - 432000 );
$Expires = @date ( 'D, d M Y H:i:00' , time () + 432000 );

 

Комментарии

<?php
//$LastModified_unix = 1294844676;
$LastModified = date("r", time()-432000);
$IfModifiedSince = false;
if (isset($_ENV['HTTP_IF_MODIFIED_SINCE']))
$IfModifiedSince = strtotime(substr($_ENV['HTTP_IF_MODIFIED_SINCE'], 5));
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']))
$IfModifiedSince = strtotime(substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 5));
if ($IfModifiedSince && $IfModifiedSince >= $LastModified_unix) {
header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified');
exit;
}
header('Last-Modified: '. $LastModified);
?>