Refresh a page using PHP

Aan picture Aan · Sep 12, 2012 · Viewed 1M times · Source

How can I refresh a page using PHP periodically? If I can not do it by PHP, what is the best recommended scenario?

Answer

user1847051 picture user1847051 · Jan 2, 2014

You can do it with PHP:

header("Refresh:0");

It refreshes your current page, and if you need to redirect it to another page, use following:

header("Refresh:0; url=page2.php");