Skip to content

Instantly share code, notes, and snippets.

@jack2jm
Created February 15, 2021 07:42
Show Gist options
  • Save jack2jm/678802880f5e49b96fb7e376b5fe969c to your computer and use it in GitHub Desktop.
Save jack2jm/678802880f5e49b96fb7e376b5fe969c to your computer and use it in GitHub Desktop.
// 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