Refresh a page using PHP
How can I refresh a page using PHP periodically? If I can not do it by PHP, what is the best recommended scenario?
Verified Answer (256 Votes) ✓
You can do it with PHP:
It refreshes your current page, and if you need to redirect it to another page, use following:
Answer #2 (108 Votes)
In PHP you can use:
$page = $_SERVER['PHP_SELF']; $sec = "10"; header("Refresh: $sec; url=$page");
Answer #3 (17 Votes)
You sure can refresh a page periodically using PHP:
<?php header("refresh: 3;"); ?>
This will refresh the page every three seconds.