View Single Post
  #4 (permalink)  
Old 09-10-2008, 07:02 AM
bosshog bosshog is offline
Newbie
 
Join Date: Mar 2008
Location: texas
Posts: 42
Thanks: 2
Thanked 1 Time in 1 Post
iTrader: (0)
Default Re: Randomizing redirect paths?

This should be easy enough, just add more urls if you wish

Code:
<?PHP

srand((float) microtime() * 10000000);

$url_list = array("http://site.com",
                  "http://site2.com",
                  "http://site3.com",
                  "http://site4.com",
                  "http://site5.com");

header('Location: '.$url_list[rand(0,count($url_list))]);

?>
Reply With Quote