[Solved] Rotate Lan...
 
Notifications
Clear all

[Solved] Rotate Landing Pages in Prosper202

6 Posts
2 Users
0 Reactions
47 Views
(@maxrey)
New Member
Joined: 8 years ago
Posts: 3
Topic starter  

Hi,

A query?. I'm moving the landings pages from my old server to this one. And when I upload the script of prosper202 to rotate the landings pages I get the following message:

= 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(); ?>

The script is on the following page:

http://prosper.tracking202.com/apps/scripts/split-testing-lps.php

The Script:

<?php
//Tracking202 Landing Page Rotation Script

//landing pages filenames, theses will be rotated between each other
//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 &gt;= 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();
?>

Do you know that I have to change to make it work or what is the problem?


   
Quote
Tharindu
(@tharindu)
Reputable Member Admin
Joined: 10 years ago
Posts: 309
 

Hi Nicolas,

Where did you see this error? Is it on your Prosper202?

And did you create a new virtual server within Virtualmin or uploaded your landing pages to same virtual server as your Prosper202?


   
ReplyQuote
(@maxrey)
New Member
Joined: 8 years ago
Posts: 3
Topic starter  

Create a new server for a new domain. And migrate the landing pages that had on the old server to this new server.

The landing pages work perfectly. What does not work for me is the rotator.

Example: when I enter

mydomain.com/lp1.php

or

mydomain.com/lp2.php

They work perfect. The problem appears when I want to use the rotator script because when I enter

mydomain.com/rotate.php

I get the following message:

= 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've always used this script with no problems. That's why I do not know what is going wrong.


   
ReplyQuote
Tharindu
(@tharindu)
Reputable Member Admin
Joined: 10 years ago
Posts: 309
 

Okay, I would like to have a look at it myself. Please PM me URLs to your landing pages and rotator. I'll also need access to the server if they are changed.


   
ReplyQuote
Tharindu
(@tharindu)
Reputable Member Admin
Joined: 10 years ago
Posts: 309
 

Thanks for sending me details Nicolas. I've checked your server and it's working as it should. You seems to have made an error when creating the rotator (index.php). The line #1 of the script is,

<?php

But your index.php file's line #1 is

<?

PHP does not execute that file due to this error.


   
ReplyQuote
(@maxrey)
New Member
Joined: 8 years ago
Posts: 3
Topic starter  

Thanks Tharindu. Problem solved


   
ReplyQuote
Share:
Back to top button