Page 1 of 1

how do I redirect after a specific time period ?

Posted: Sun Jan 19, 2003 10:23 pm
by elipollak
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

Posted: Mon Jan 20, 2003 1:19 am
by mydimension
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.

Code: Select all

<meta http-equiv="refresh" content="60;URL" />
replace URL above with the url you want to redirect to.

note: moved to client side forum.

Posted: Sat Jan 25, 2003 2:51 pm
by Kriek
header() refresh/redirect with delay.

Code: Select all

<?php header("refresh: 5; url=http://$SERVER_NAME/page.php"); ?>
header() refresh/re-direct without delay

Code: Select all

<?php header("Location: http://$SERVER_NAME/page.php"); ?>