Unstoppable Domains โ€” AI Assistant

Php forward

Spacemail by SpaceshipSpacemail by Spaceship
Watch
Impact
167
timed php redirect

ok.. i no how to forwar a page to another page, but how would make it so it doest it in a certain amount of time, such as 5 seconds


what i have
<?php
header("Location: $location)
?>
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
It should work

Well, if you want it to redirect after x second, use this (not a script, simply HTML):

<META HTTP-EQUIV="refresh" CONTENT="x;URL='http://blablabla.com'">

place this of course in the middle of <HEAD></HEAD> tag and send the page to browser.

If you really want to make it via PHP send the following header:

header("Refresh: $sec; URL=http://blablabla.com");

where $sec means seconds amount of course.
Anyway, PHP "refresh" header throwing is some kind of strange thing when finally still the browser has to make all the work (or not).

By the way, when you want it to redirect after for example 5 seconds, substract from this a time needed to load the page: 1-2 seconds or so - this will be almost accurate counting.

You should also add classic link to the redirected location in case browser will not do it right (sometimes it doesn't work or user has got browser redirection switched off)

Hope it helped!
 
Last edited:
0
•••
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Zero Commission
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back