Automatic Page Refresh
Published on: 2005-10-26 - Views: 22682
In this tutorial we'll see how to refresh a page after a preset amount of time (usually seconds or minutes).
Functions like this are used in big portals to automatically refresh the home page (or subpages) in order
to give always updated news.
<?php
header("Refresh: 120;");
?>You can use this php line also to redirect (with the preselected delay) to another page of your site, or external to your site.
This will send the visitor to the forums (assuming you have the forums running under the folder "forums" as ours) after 6 seconds.
<?php
header("Refresh: 6; url=/forums/");
?><?php
header("Refresh: 10; url=http://www.php.net");
?>


