Inizio dockerizzazione

This commit is contained in:
2022-08-29 23:20:16 +02:00
parent b348b3a83d
commit 3d22f4cc6a
851 changed files with 1117 additions and 904 deletions
@@ -0,0 +1,30 @@
<?php
/*
Author: Riccardo Di Dato
Creation Date: 17/mar/2016
*/
class UpdateMeteoCacheTask extends Task {
public static function getName(){
return "updateMeteoCache";
}
public static function getLabel(){
return "Aggiorna la cache per il meteo";
}
public static function execute(){
if (intval(date("H"))%2==0){
$config = GlobalVariables::get("config");
$cont = file_get_contents("http://api.openweathermap.org/data/2.5/forecast?q=Naples,IT&appid=7a40fdbd3d7d36fca7c3e4e5f40c47f6&units=metric&lang=it");
if (strcmp($cont, "")!=0){
file_put_contents($config->files->meteoCache, $cont);
}
}
}
}
?>