Simple script to rotate landing pages?

Delta223

New member
Aug 14, 2009
162
1
0
I need a script that will output a URL that will randomly redirect to one of my landing pages (to evenly distribute traffic from a single source) Anyone know of a good script to accomplish this?

PS prosper202 wont work since my traffic does not come through a search engine.
 


<?php
$urls = array(
"http://google.com",
"http://yahoo.com"
);

$url = array_rand($urls);
header("Location: {$url}");
?>

^---- fyi, should work but didn't check (just typed it in, might have syntax errors, etc...)

but keep in mind random won't neceserally be "even"

try split testing with Google Website Optimizer though
 
Post back if you want a script that rotates evenly. Its slightly more work, but easy.

Keep in mind that random might not be "even", but it usually will work out to 50/50 if you had only 2 landing pages, like in the above example.

For now, looks like LeFluffy has you covered.
 
Post back if you want a script that rotates evenly. Its slightly more work, but easy.

Keep in mind that random might not be "even", but it usually will work out to 50/50 if you had only 2 landing pages, like in the above example.

For now, looks like LeFluffy has you covered.

Sure, even would be better than random. Thanks for the help