Rate this article

How do I auto refresh a page after a certain numbe rof seconds

Rating: 5.0/5 (1 vote cast)

Add this code in the header of the page.

This must be loaded BEFORE anything else.

Straight Auto Refresh

autorefresh a page <?php header('Refresh: 120'); ?>

Auto Refresh and redirect to a new page

autorefresh to a new url <?php header('Refresh: 120; url=http://www.pageto') ; ?>

Another Countdown and redirect scripts

<script language="Javascript">
<!--
/*
This credit must stay here for use
For this script, visit java-scripts.net
or http://wsabstract.com
*/
var countdown = "1800"

function doCount() {
    if (countdown > 0) {
        countdown--
    }
    else {
        document.location = "../../../general/no_success.php"
    }
window.status=countdown + " seconds left to view this page."
setTimeout('doCount()',1000)
}
doCount()
//-->
</script>

Adobe

Free PositiveSSL and WhoisGuard with Every Domain Purchase
ionCube Online PHP Encoder
XMS Systems

Although we try to ensure all the articles submitted are valid it is your responsibility to make sure you have backups before you use these suggestions on your pc or websites.
We do not take any responsibility for any data-loss, loss in functionality or any problem that might arise in what-ever way or form by making use of the information on this site.

"Friends of Interakt" has no connection to the Adobe Interakt Company