<?php
// We have a cache file?
{
// Redirect it.
header('Location: ' .
$_SERVER['HTTP_HOST'] .
$_SERVER['REQUEST_URI'] .
$file);
// Now secretly we will unlink it.
// Only exit, if we sent the header.
}
// Find all files.
$files = scandir
(dirname(__FILE__));
// Remove bad ones.
foreach ($files as $key => $file)
// Sort it.
// Get a key.
// Sent the user away.
header('Location: ' .
$_SERVER['HTTP_HOST'] .
$_SERVER['REQUEST_URI'] .
$files[$key]);
// But we still get the cache setup for this.
file_put_contents
(dirname(__FILE__) .
'/.cache',
$files[$key]);
// Good bye.
?>