annotate cache_check.inc @ 2:6d420f2a1d91

Add flag generator.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Tue, 10 May 2011 19:07:57 +0200
parents d2da64705bce
children 6c0162497d56
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
1 <?php
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
2 $if_modified_since = preg_replace('/;.*$/', '', $HTTP_IF_MODIFIED_SINCE);
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
3
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
4 $mtime = filemtime($SCRIPT_FILENAME);
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
5 $gmdate_mod = gmdate('D, d M Y H:i:s', $mtime) . ' GMT';
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
6
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
7 if ($if_modified_since == $gmdate_mod) {
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
8 header("HTTP/1.0 304 Not Modified");
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
9 exit;
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
10 }
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
11 header("Last-Modified: $gmdate_mod");
d2da64705bce Refactored everything in the CMS into this repos.
Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
parents:
diff changeset
12 ?>