Created
February 15, 2021 07:42
-
-
Save jack2jm/678802880f5e49b96fb7e376b5fe969c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// reload page when events actual starts | |
try{ | |
if($diff_seconds_event_starts && $diff_seconds_event_starts> 0){ | |
$current_page_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";; | |
header("Refresh: $diff_seconds_event_starts; url=$current_page_url"); | |
} | |
}catch(Exception $e){} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment