Hi, I am trying to locate a php redirect code that allows you to control the time in how long it will take before it redirects the page to the other. If anyone can help, please let know!. Thank you!
PHP redirects are instantaneous. If you want to use a redirect with a time delay you should output a HTML redirect page from your php.
function redirect($time, $topage) { echo "<meta http-equiv=\"refresh\" content=\"{$time}; url={$topage}\" /> "; } redirect(3,'location.php');
you could use the sleep function such as <?php goNow(); ?> <?php function goNow(){ //will wait 5 seconds sleep(5); header('Location: http://www.google.com'); } ?> PHP: