Random redirect to url
Posted: Mon Sep 25, 2006 11:42 am
I need a little help finishing this script, or even any better ways of doing it. I simply want to randomly send a user to a url. Here is what I have so far:
<?
$random_url = array("http://www.url1.com",
"http://www.url2.com",
"http://www.url3.com",
"http://www.url4.com",
"http://www.url5.com");
srand(time());
$random = (rand()%5);
print("URL: $random_url[$random]");
?>
How do I perform the redirect or should I use an iframe and if so how.
Thank you,
Jeff Mikolai
<?
$random_url = array("http://www.url1.com",
"http://www.url2.com",
"http://www.url3.com",
"http://www.url4.com",
"http://www.url5.com");
srand(time());
$random = (rand()%5);
print("URL: $random_url[$random]");
?>
How do I perform the redirect or should I use an iframe and if so how.
Thank you,
Jeff Mikolai