on the first page (before advertising) before the doctype or html tag:
<?php header("location: adlocationhere.php"); ?>
Then on the announcement page put the following:
<?php header("refresh:5;url=secondredirectafter5seconds.php"); ?>
This will immediately redirect the first page and redirect the second page after 5 seconds. Hope this helps (it should also get rid of the ability to change header information if you put it before the doctype and html tags).
EDIT: Also, with javascript, this could be a security risk b / c, any user can change their location. By doing this in this way, you have full control over where the user is going.
jefffan24
source share