Commit 810beee2 authored by Nico Schallehn's avatar Nico Schallehn

test

parent 90a64aa4
......@@ -3,17 +3,8 @@ ini_set("display_errors","On");
error_reporting (E_ALL);
function jsonCacheDecoder($url){
$CacheFolderName = "JsonCache/";
exec("rm ".$CacheFolderName.date("y-W_",time()-14*24*3600)."* > /dev/null 2>&1");
exec("rm ".$CacheFolderName.date("y-W_",time()-1*24*3600)."* > /dev/null 2>&1");
if(!is_dir($CacheFolderName)){
exec( "mkdir ".$CacheFolderName);
}
$filename= date("y-W_",time()).md5($url).".json"; //TODO Cachetime Ändern
if(!file_exists($CacheFolderName.$filename)){
file_put_contents($CacheFolderName.$filename, file_get_contents($url));
}
return json_decode(file_get_contents($CacheFolderName.$filename), true);
return json_decode(file_get_contents($url), true);
}
$tmdbKey = "b1ddcc7d16281ce09f692896f882ba9d";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment