header("Location: https://example.com"); exit;
header("Location: /newpage.php"); exit;
header("Refresh: 5; url=https://example.com"); echo "Redirecting in 5 seconds..."; exit;This code will redirect the user to the "https://example.com" URL after a 5-second delay. Package library: The "header" function is a core PHP function and does not require any package library.