Inserito meteo
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?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(){
|
||||
$config = GlobalVariables::get("config");
|
||||
|
||||
$cont = file_get_contents("http://api.openweathermap.org/data/2.5/forecast?q=Naples,IT&appid=b1b15e88fa797225412429c1c50c122a&units=metric&lang=it");
|
||||
|
||||
file_put_contents($config->files->meteoCache, $cont);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user