Create a file named "last.txt" and place one single character in it, "0" (zero). Then put the following code in rotate.php and link to it. Change the first variable to the total number of links, in the example it's 2. Add $site["x"] = "URL"; lines for each URL.
Code:
<?PHP
$total = 2;
$site["1"] = "http://www.ha4l.com/";
$site["2"] = "http://www.eg4l.com/";
$DatFile = "last.txt";
@ $fp = fopen($DatFile, "r");
flock($fp, 1);
$filelength = filesize($DatFile);
$visits = fread($fp, $filelength);
flock($fp, 3);
fclose($fp);
$visits = $visits + 1;
if ($visits > $total) { $visits = 0; }
@ $nfp = fopen($DatFile, "w");
flock($nfp, 2);
fwrite($nfp, $visits);
flock($nfp, 3);
fclose($nfp);
header("Location: " . $site[$visits] );
?>