PHP Script: Split Test Redirect

<?php
$redirect[0] = 'http://url1.com';
$redirect[1] = 'http://url2.com';
$redirect[2] = 'http://url3.com';

$number = mt_rand(0,2);

header("Location:$redirect[$number]");
?>

Add as many URLs as you’d like and adjust the mt_rand function¬†accordingly.

Full Post