PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
siddahuja
Forum Newbie
Posts: 1 Joined: Fri Oct 28, 2005 5:03 pm
Post
by siddahuja » Fri Oct 28, 2005 5:06 pm
Hi
I am trying to find a method to redirect to a new url once the headers have already been passed.
Please advise.
thanks
sid
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Fri Oct 28, 2005 5:10 pm
meta refresh or javascript location method
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Fri Oct 28, 2005 7:16 pm
Code: Select all
<script language="javascript">
location.replace("http://www.whatever.com")
</script>
Or if you want a time delay:
Code: Select all
<script language="javascript">
setTimeout("location.replace(sTargetURL)", time_in_milliseconds)
</script>
to get milliseconds just multiply the amount of seconds times 1000