This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$key = $_SERVER['REMOTE_ADDR'] . serialize($_REQUEST); | |
if(strlen($key) < 500){ // help prevent flooding. | |
$key = md5($key); | |
// global so we can find it in the shutdown function | |
$GLOBALS['wordpress_temp_file'] = dirname(__FILE__).'/cache/wp_'.basename($key); | |
if(is_file($GLOBALS['wordpress_temp_file']) && filemtime($GLOBALS['wordpress_temp_file']) > (time() - 3600)){ | |
$data = unserialize(file_get_contents($GLOBALS['wordpress_temp_file'])); | |
echo $data['content']; | |
exit; | |
} |
NewerOlder