N
nick
Guest
Sometimes you want to code such a thing that the user is redirected to particular page rather then linking to that page directly.
Like we see when we download some applications. Where there is small amount of time we have to wait before it automatically redirects to the other place.
The code for it is:
The above code is for instant redirect to the given URL in the $website variable.
The above code is for redirecting to the specified URL in 5 seconds. You can also print the waiting message while the user is waiting for the page to redirect.
Like we see when we download some applications. Where there is small amount of time we have to wait before it automatically redirects to the other place.
The code for it is:
PHP:
<?php
$website = "http://www.nameslot.com";
header("Location: $website");
exit;
?>
The above code is for instant redirect to the given URL in the $website variable.
PHP:
<?php
$website = "http://www.nameslot.com";
header("refresh: 5; $website");
echo "Please wait you will be redirected in 5 seconds.";
?>
The above code is for redirecting to the specified URL in 5 seconds. You can also print the waiting message while the user is waiting for the page to redirect.