My Landing Page Rotation and Cloaking Script

by Chris · 12 comments

Today, I wanted to share with you a php redirect script that I use. This is an essential tool for any PPC or PPV marketer. It performs two main things which are important to me: Landing page rotation and link cloaking.

Landing page rotation is important because it allows you to split-test several offers at a time and find the offers that generate the best ROI. This is essential for any PPC or PPV campaign you setup. Any particular offer might not convert for a variety of reasons, so by rotating offers you increase your odds of having a successful campaign.

People think of cloaking as something blackhat (which it can be) but there are perfectly legitimate reasons to cloak as well. For example, some CPA offers you want to run will redirect to some other offer if the visitor is from another country. Facebook in particular, employs non-US reviewers who won’t be able to view your perfectly valid landing page. By using cloaking, you can show a compliant offer/LP to the reviewer and switch to the one you really want to run after your campaign has been approved.

At the bottom of this post is a link to download my script. Unzip it and upload the file redirect.php somewhere on your server. The rotation part of it is based on Prosper202 rotation script which I personally like because it rotates between LPs sequentially (instead of randomly). Open up the script in your favorite text editor and let me give a brief overview of how you use it.

Near the top of the script, you should see this line:

$cloaked = 'http://xyz.com';

Set the $cloaked variable to the landing page you want to show your reviewers. If you were promoting SinglesNet for example, you could set this to http://singlesnet.com since is their main, non-geotargeted url.

Below is the code where you set your offer rotations.

$real[] = 'http://xyz.com/tracking202/redirect/dl.php?t202id=12345&t202kw=';
$real[] = 'http://xyz.com/tracking202/redirect/dl.php?t202id=67890&t202kw=';

The $real array is where you add the actual urls of your rotations. So in the above code snippet, I am rotating between two direct linked Prosper 202 urls. To add another offer, just follow the same format as the first two and add a new line with the new landing page url.

Finally, near the bottom of the script you should see this line of code.

// Set this to $cloaked or $real
$location = $cloaked;

When you want to show your cloaked offer, then make sure the line reads $location = $cloaked. Once your campaign has been approved, just change it to $location = $real and you will start showing the landing pages in your rotation. This is a really simple form of cloaking. You could get more sophisticated and cloak by IP address, but we will leave that for a future post. This method works fine in most cases though.

Once you have the script configured, you can now use it in your campaigns. The script uses the kw parameter to pass in the keyword through to your offer links. Below are a couple of examples of how you would use it.

# POF - Click-thru URL
http://mysite.com/redirect.php?kw=pof1
 
# TrafficVance - Creative URL
http://mysite.com/redirect.php?kw=%%$KEYWORD%%

Before you go live with your campaign, make sure you test the links and see that they go where you are expecting them to. I hope some of you guys find this useful for your own campaigns. If you have any questions about how to use it, please let me know in the comments.

Download here (Right-click Save As)

Incoming search terms:

  • php redirect rotate
  • ppc cloaking script
  • php cloaking script
  • php offer rotator script
  • php rotate redirect script

{ 12 comments… read them below or add one }

Jeffrey March 26, 2010 at 11:18 pm

Hell yeah! This kicks some serious ass. Thanks for sharing Mister Fong

Reply

Sam March 28, 2010 at 2:06 pm

Thanks for sharing your rotation script. I’m going to start using it myself.

Reply

cv June 2, 2010 at 8:11 pm

I appreciate you having this script available. I did a Google search for “offer rotator script” and your site popped up.

Good job !

Reply

Aaron Cross July 28, 2010 at 6:32 pm

Awesome script man — very killer content your providing!

On lookers: This script works 100% and unlike the majority of the rotators out there that just randomly send the traffic, this one is spot on. I have literally 50/50′d all my traffic.

Very even, very fast, thanks for the script Fong…

May just send my list to your blog for a peek. :)

- Aaron Cross

Reply

misterfong July 28, 2010 at 8:36 pm

Glad you’re finding it useful Aaron. I got some cool stuff planned in the future as well so stay tuned.

Reply

Daniel Gibbs September 1, 2010 at 11:25 am

Just wanted to say thank you for the excellent script. This has saved me so much time. I was having a real head ache trying to get a LP rotator and this script was really easy to set up.

Thanks again (-;
Dan.

Reply

gus December 1, 2010 at 6:49 am

Mister Fong, it seems the download link is missing. Please advise, I want to try your script.

Thank you.

Reply

misterfong December 1, 2010 at 6:54 am

Thanks for point that out Gus. I’ve fixed the link so you should be able to download now.

Brent December 29, 2010 at 8:06 pm

Thanks for this script! After trying around 3-4 other scripts floating around I finally found the one. It splits all the traffic + passes KW’s correctly!

Reply

misterfong December 29, 2010 at 9:39 pm

That’s great. Glad you like it.

Veronica December 26, 2011 at 8:11 pm

The script works great Chris! I was expecting that we need to pay before getting this but i was surprised that you gave it for free. This is really useful and I’m really impress with your character. You’re giving tons of useful information and scripts out there. If others created this, I’m pretty sure that they require payments before their followers can use it. This is one great Christmas giveaway Chris! Thank you once again!

Reply

Chris December 26, 2011 at 11:26 pm

Thanks Veronica. Glad you like it and I appreciate the compliments. :)

Leave a Comment

CommentLuv badge
This blog uses premium CommentLuv which allows you to put your keywords with your name if you have had 8 approved comments. Use your real name and then @ your keywords (maximum of 3)

Previous post:

Next post: