Grazie per la risposta! ho risolto in questo modo:
Codice PHP:
<?php
$DateAndTime = date('m-d-Y h:i:s a', time());
echo "<h3 aling=center>The current date and time are $DateAndTime.";
if (date('H') < 10 and date('H') == 9) {
$pre2pm = true;
$url ="link file usare www. e non htpps://";
// Initialize the cURL session
$ch = curl_init($url);
// Initialize directory name where
// file will be save
$dir = './';
// Use basename() function to return
// the base name of file
$file_name = basename($url);
// Save file into file location
$save_file_loc = $dir . $file_name;
// Open file
$fp = fopen($save_file_loc, 'wb');
// It set an option for a cURL transfer
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
// Perform a cURL session
curl_exec($ch);
// Closes a cURL session and frees all resources
curl_close($ch);
// Close file
fclose($fp);
}else{
echo"<br><br>Aggiornamento bloccato";
}
?>