Landing Page Rotator?

aim high

New member
Jun 3, 2008
335
5
0
Im using the one from prosper, but they do not have something that stores a cookie so that when the customer comes back its the same page. I was wondering if anyone had a script available like this.
 


Should be a fairly easy addition. I haven't looked at the source, but you'll want to add a cookie based on which LP the person sees. Check to see if there's a cookie before hitting the rotator script - if there's a cookie, then redirect to the specific landing page as specified in the cookie. If not, hit the rotator script & add the cookie.
 
The Prosper script does set a cookie. Search for "$_COOKIE" or "setcookie" in the code.


are you using the split testing lp code? i dont see it here

<?

//Tracking202 Landing Page Rotation Script

//landing pages filenames, theses will be rotated between eachother
//theses landing pages must be in the same DIRECTORY as this file
//you can add as many landing pages here as you like
$landingpage[1] = 'landingpage1.php';
$landingpage[2] = 'landingpage2.php';
$landingpage[3] = 'landingpage3.php';

//this is the text file, which will be stored in the same directory as this file,
//count.txt needs to be CHMOD to 777, full privlledges, to read and write to it.
$myFile = "count.txt";

//open the txt file
$fh = @fopen($myFile, 'r');
$lpNumber = @fread($fh, 5);
@
fclose($fh);

//see which landing page is next in line to be shown.
if ($lpNumber >= count($landingpage)) {
$lpNumber = 1;
} else {
$lpNumber = $lpNumber + 1;
}

//write to the txt file.
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = $lpNumber . "\n";
fwrite($fh, $stringData);
fclose($fh);

//include the landing page
include_once($landingpage[$lpNumber]);

//terminate script
die();

?>
 
I was looking at custom modified code.

Insert this:

Code:
if ( $_COOKIE['whichlp'] ) {
    $lpNumber = $_COOKIE['whichlp'];
} else {
    setcookie("whichlp",$lpNumber);
}
right before:

Code:
//write to the txt file.


 
I was looking at custom modified code.

Insert this:

Code:
if ( $_COOKIE['whichlp'] ) {
    $lpNumber = $_COOKIE['whichlp'];
} else {
    setcookie("whichlp",$lpNumber);
}
right before:

Code:
//write to the txt file.




thanks!