[Solved] Rotate Landing Pages in Prosper202

home Forums Internet Marketing [Solved] Rotate Landing Pages in Prosper202

This topic contains 5 replies, has 2 voices, and was last updated by Profile photo of Nicolas Nicolas 5 months, 1 week ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6032
    Profile photo of Nicolas
    Nicolas
    Participant

    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?

    #6033
    Profile photo of Tharindu
    Tharindu
    Keymaster

    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?

    #6035
    Profile photo of Nicolas
    Nicolas
    Participant

    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.

    #6037
    Profile photo of Tharindu
    Tharindu
    Keymaster

    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.

    #6038
    Profile photo of Tharindu
    Tharindu
    Keymaster

    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.

    #6039
    Profile photo of Nicolas
    Nicolas
    Participant

    Thanks Tharindu. Problem solved

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.