Files
Testing/tumblr_feed_a3658vb2/top-cache.php
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

25 lines
727 B
PHP

<?php
$url = $_SERVER["SCRIPT_NAME"];
$break = Explode('/', $url);
$file = $break[count($break) - 1];
$cachefile = 'cached-'.substr_replace($file ,"",-4).'.html';
$cachetime = 40;
$thefiletime="0000";
if (file_exists($cachefile))
{
$thefiletime=filemtime($cachefile);
}
$thetime=time() - $cachetime;
$thetext="Cron job Run ".$thetime." filedate".$thefiletime."---";
mail("porembaphilip@gmail.com", "Cron Indicator", $thetext);
// Serve from the cache if it is younger than $cachetime
if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile)) {
echo "<!-- Cached copy, generated ".date('H:i', filemtime($cachefile))." -->\n";
include($cachefile);
exit;
}
ob_start(); // Start the output buffer
?>