Redirection Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Stelios
Forum Commoner
Posts: 71
Joined: Fri Feb 06, 2004 6:25 am
Location: Surrey/UK

Redirection Question

Post by Stelios »

I have got this line of code which is redirecting the user...

Code: Select all

header ("Location:  http://" . $_SERVERї'HTTP_HOST'] . dirname($_SERVERї'PHP_SELF']) . "/xxx.php");
Is there any way I can make this redirection happen 3-4 secs later?

Thnx a lot! :D
The Monkey
Forum Contributor
Posts: 168
Joined: Tue Mar 09, 2004 9:05 am
Location: Arkansas, USA

Post by The Monkey »

Code: Select all

header("Refresh:3;URL=http://example.com");
Take that example with a grain of salt, please. I saw it on another forum and never bothered to try it out.

- Monkey
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Refresh is only supported on IIS and some other server, as far as I remember. To redirect after a given amount of time, use a meta-refresh (html)
Post Reply