Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Bhavya8181/977be6b5896cdbb03ce657548555a4b0 to your computer and use it in GitHub Desktop.
Save Bhavya8181/977be6b5896cdbb03ce657548555a4b0 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