Donate SIGN UP

Script

Avatar Image
MTIH1992 | 22:11 Fri 29th Sep 2006 | Technology
5 Answers
Hey. I am looking for a script that allows me to type in a bunch of URL's on my website and I want the script to randomly select one of them and forward to it after a specific amount of time. HELP ME please :-(
im totaly desperate!

Thanks, Matt
Gravatar

Answers

1 to 5 of 5rss feed

Best Answer

No best answer has yet been selected by MTIH1992. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
So you want one page to redirect you to one of, say, 10 different URL's and for this 1 (of 10) URLs to eb chosen randomly?

How far along with it are you so far? Seems a simple combination of a random number generator and an array of URLs then a javascript redirect. A wee bit of jargon there!
I've found an olde page that I wrote many moons ago that does this - one good thing about it is that if you have 4 different URLs, the script counts those 4 and chooses a number at random between 1 and 4. If you have 14 URLs, it's a random number between 1 and 14.
I've seen other scripts where you had to insert the URLs, count them and then manually enter their total. Pah!! Amateurs!!

Save what you see here as an html page >
http://www.stevie21.com/AB/redirectCode.html

All you need to do is insert the time delay
Question Author
This looks brilliant! (but how do i define how long it takes to re-direct?
I wrote some code to do this a few weeks ago. Was that not what you were after? (It required you to type the url into, not a visitor).
I've added a time delay - check back on that same page of mine

1 to 5 of 5rss feed

Do you know the answer?

Script

Answer Question >>