quick question!
this is the current code I am using to split test 2 landers
[PHP]<?php
$lp1 = "http://domain1.com?t202id=####&t202kw=" . $_GET['keyword'];
$lp2 = "http://domain2.com?t202id=####&t202kw=" . $_GET['keyword'];
if(rand(0,1) == 0) {
header("Location: $lp1");
} else {
header("Location: $lp2");
}
?>[/PHP]
how can I throw another lander into the rotation?
Try this:
[PHP]<?php
$links = array(
'http://www.google.com/',
'http://www.yahoo.com/',
'http://www.bing.com/'
);
header('Location: ' . $links[array_rand($links)]);
?>[/PHP]
To add more landers, just add them to the array.
that works, but is ther a way to pass the keyword variable through from the original link like I have in the first part?
[php]
<?php
$kw = $_GET['keyword'];
$links = array(
"http://www.google.com/?t202id=####&t202kw=$kw",
"http://www.yahoo.com/?t202id=####&t202kw=$kw",
"http://www.bing.com/?t202id=####&t202kw=$kw"
);
header('Location: ' . $links[array_rand($links)]);
?>
[/php]
This is one of those over-my-head technical posts I can ignore if I use CPV Lab...right??!?!
;-)
Yep cpvLab is awesome for split testing LPs!