PHP page redirect after certain time

<?php
header ('HTTP/1.1 301 Moved Permanently');
header( "refresh:5;url=https://www.anothersite.com/" );
exit;
?>