Posted on

a Free Simple Landing Page Rotator PHP Script

random-landing-page-rotator-script

Here’s a free simple quick and easy landing page rotator PHP script.  

You can use this to quickly rotate random landing pages. I’m not gonna say this is the best landing page rotating script out there, but it’s something quick and easy that may be of use to you. There are many different ways to rotate landing pages, some easy, and some with a whole lot more advanced features. 

Here’s the simple script code:

——————————————-
<title></title>
<?php 
//How many landing pages to rotate? 
$lp = rand(1,2);
//Load random landing page
include ($lp . “.php”); 
?>
——————————————-

Basically, here’s how to use this. If you have 4 landing pages then you would replace $lp = rand(1,2); with $lp = rand(1,4);

You would rename each of your landing page file names to 1.php, 2.php, 3.php, and 4.php . The script will randomly pick a php file based on the number 1 to 4.

A php file can just be an html file such as mypage.html, but you have to rename it to 1.php or whatever #.php so it can be rotated. Here’s a sample html landing page which you can save as a .php file.

<html>
<head>
</head>
<body>
This is my html landing page saved as a PHP file!
</body>
</html>

Okay you can see a demo here. This example landing page rotator will rotate between 2 landing pages. You can refresh the page to see it rotate.

http://howtowebmaster.com/demo/simple-lp-rotator/

You can even pass in keywords if you like (Used for PPC/PPV campaigns):

http://howtowebmaster.com/demo/simple-lp-rotator/?keyword=THIS IS MY KEYWORD

You can download this simple landing page rotating script here below

Download the simple Landing page rotator here

2 Comments

  1. Thank you so much for this dude, works a charm, I’ve been looking for something like this for ages!

Leave a Reply

Your email address will not be published. Required fields are marked *