lets say I want to open a new webpage in the browser after it had been upened for 60 seconds, how would i do that in php.
So if I open a webpage, say http://www.somesite.com/index.php
how would I make it so that after 60 seconds it directs to another webpage
(or even the same one .. to update it)
I looked at php.net, but don't know quite what to search for.
It's probably simple, but I just can't find it
any help would be great
Regards,
Eli
how do I redirect after a specific time period ?
Moderator: General Moderators
- mydimension
- Moderator
- Posts: 531
- Joined: Tue Apr 23, 2002 6:00 pm
- Location: Lowell, MA USA
- Contact:
since php's control over the page ends after it is sent to the browser you cannot do this with php. you can however use a meta tag to achieve the same result.
replace URL above with the url you want to redirect to.
note: moved to client side forum.
Code: Select all
<meta http-equiv="refresh" content="60;URL" />note: moved to client side forum.
header() refresh/redirect with delay.
header() refresh/re-direct without delay
Code: Select all
<?php header("refresh: 5; url=http://$SERVER_NAME/page.php"); ?>Code: Select all
<?php header("Location: http://$SERVER_NAME/page.php"); ?>