Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
PHP Server Side Scripting
8:36 am May 21, 2026
This page requires javascript.
Forum Moderators:
coopster
Message Too Old, No Replies
Auto redirect
Auto redirect after 10 seconds
Adam5000
Msg#:4391563
3:05 am on Nov 28, 2011
(gmt 0)
Greetings all.
I'm working on a holiday update for my website and I've got an idea that involves redirection.
I'm trying to write PHP code that will automatically redirect a visitor from page one to page two after say ten seconds.
Help!
Leosghost
Msg#:4391571
4:14 am on Nov 28, 2011
(gmt 0)
Search for "meta refresh" ( you don't need to use PHP to do what you want..there are various other ways )..HTH :)
penders
Msg#:4391620
11:45 am on Nov 28, 2011
(gmt 0)
Or... JavaScript timer event to change the location.href?
You could use PHP to write out the meta refresh (or the JavaScript) but PHP itself cannot do this.
If you use JavaScript you could perhaps allow the user to 'pause' the redirection if required?
omoutop
Msg#:4391676
3:23 pm on Nov 28, 2011
(gmt 0)
sleep(10);
header("Location: page-two.htm");
As long as there is no output to screen, this should work.
If you want to redirect user after the page loads, then only javascript can provide you with a solution.
g1smd
Msg#:4391765
7:51 pm on Nov 28, 2011
(gmt 0)
Keep-alive may not keep the connection open for that long.
Your redirect also returns a 302 status.
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Apr
,
Mar
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
May 2026 Google Search Observations
AdSense Earnings and Observations - May 2026
AI visibility audit
Adsense / Personal Manager / Support
Hacker spoofing as GoogleBot
Page indexed but live url test gets 500 error
Link collaboration strategies
in case you missed it .
Microsoft, AS8075. Google, AS396982.
Bad actor claiming to be OpenAi
Home
Forums Index
Server Side
/
PHP Server Side Scripting
8:36 am May 21, 2026