<?php header("Access-Control-Allow-Origin: *"); $page = $_SERVER['PHP_SELF']; $now = time(); $today = strtotime('3:00'); $tomorrow = strtotime('tomorrow 3:00'); if (($today - $now) > 0) { $refreshTime = $today - $now; } else { $refreshTime = $tomorrow - $now; } header("Refresh: $refreshTime; url=http://localhost/covid_19/services/get_data_from_url.php"); ?>