Use this..
PHP Code:
<?php
$fileName = "ads.txt";
mt_srand( (double) microtime() * 1000000 );
$a = file($fileName);
$randNum = mt_rand( 0, sizeof($a)-1 );
header( "Location: ". $a[$randNum] );
?>
Also create a .txt file with one url on each line and upload it to the location defined in $fileName = "ads.txt";
Then rename the .php file to something like index.php and upload to your server
Regards,
Lee