What are some best practices for implementing a page redirect after a specific time in PHP?

When implementing a page redirect after a specific time in PHP, it is important to use the `header()` function to send a raw HTTP header to perform the redirection. To delay the redirect, you can use the `sleep()` function to pause the script execution for a specified number of seconds before redirecting.

<?php
// Delay the redirect for 5 seconds
sleep(5);

// Redirect to the desired page
header("Location: http://example.com/newpage.php");
exit;
?>