Redirects to a random URL from a array of URLs.
Redirect sequentially on each visit
<?php
$urls = array("url01",
"url02",
"url03");
$url = $urls[array_rand($urls)];
header("Location: http://$url");
?>
Redirect sequentially on each visit
<?php
session_start();
$curr = array_key_exists('curr', $_SESSION) ? $_SESSION['curr'] : 0;
$urls = array("url01", "url02", "url03");
$curr = $curr >= sizeof($urls) ? 0 : $curr;
$_SESSION['curr'] = $curr + 1;
header('Location: http://' . $urls[$curr]);
?>