Can you include a time delay in a header redirect in PHP?
To include a time delay in a header redirect in PHP, you can use the `header()` function in combination with the `sleep()` function. The `header()` function is used to send a raw HTTP header, including the redirect location, and the `sleep()` function is used to pause the script execution for a specified number of seconds before the redirect occurs.
<?php
// Set the delay time in seconds
$delay = 5;
// Wait for the specified delay time
sleep($delay);
// Redirect to the desired location after the delay
header("Location: https://www.example.com");
exit;
?>