echo "<script> window.location.href = 'http://domain.com'; alert('After this goes away, I will be redirected via JavaScript'); </script>";