Why use PHP at all in that code gszauer? Wouldn't this slight edit to your code also work?
<html>
<head>
<script type="text/javascript">
<!--
function delayer(){
window.location = "http://www.theredirectedsite.com"
}
//-->
</script>
</head>
<body onLoad="setTimeout('delayer()', 3000)">
<!-- 3000 is representing 3000 Milliseconds, or 3 seconds -->
<p>You are being redirected !!!</p>
</body>
</html>