How to Auto Refresh webpage every 5 seconds in PHP?

Below is a sample code demonstrating how to refresh the webpage automatically every 5 seconds in PHP.

How to Auto Refresh webpage every 5 seconds in PHP?

<?php

$url1=$_SERVER['REQUEST_URI'];

header("Refresh: 5; URL=$url1");

?>