Protect Your Landing Pages from Prying Eyes
October 25, 2012 in Landing Pages, Scripts, Tools, Tracking
Another code-monkey snippet comes your way my dear friends. This time, it’s inspired from a comment I saw from a dear friend Lorenzo Green (www.mrgreen.am) himself on STM about protecting his landing pages with a set of ‘rules’ in order to prevent his pages from being ripped so easily – or at all!
Inspired to do the same for myself – I’ve come up with this little bit of code that I hope, will prevent the majority of ill-intended users from thieving my landing pages – or at least not easily
There is a line of code for mobile-based browsers in there, so comment that out if you don’t require that check!
You’ll need MaxMind’s GeoIP database on your server to enable country based checks, as well as have a little knowledge on setting up a database with cPanel (easiest way is to use the wizard to do so).
You’ll need a simple database with a table named ‘visitors’ and with two columns. These are
- ip_address
- campaign_id
Step 1 – Download the PHP File
Place this somewhere accessible on your server – for mobile campaigns you can have one in /libs/mobile/ for instance and include the browser check (line 36).
Step 2 – Use a Unique c1 Variable
When tracking, you can append a “c1″ variable (with cpvlab, just add an extra token, with p202 it’s there by default).
Put a unqiue code as your c1 variable so that your tracking links contain one – i.e. http://someawesomelandingpage.com?keyword=fitness&c1=AB1234567
Step 3 – Include the Reference In Your LP
Place this a the top of your landing page(s).
<?php
include_once("lp-protect.php"); //this will change based on where you stored the file
//change country, id and c1 variable accordingly
if(!checkRules("united states", "unique-campaign-id-goes-here", "unqiue-c1-variable-goes-here")){
header('Location: index2.php'); //this is the 'fake' landing page you wish to redirect to.
}
?>
If you did all this correctly, you should be done!
Rinse and repeat step 2/3 for any new landing pages and you’re golden. Add more rules as you please.. but any more could hinder your campaigns a bit.
[Update]
Realized I left some debugging code in my code and I overlooked a potential issue with mobile devices where IP addresses could possibly be pooled and therefore causing a lot of devices to be redirected (when they shouldn’t). I’ve included a different check (using cookies) which should be safer to use on mobile. The IP check is still valid and should work in most, if not all cases on Web. Unless of course the traffic is coming from a pooled IP. Use the IP based block at your own risk..
—
If you’re looking for further PPV Guidance, the guys over at PPV Playbook know their shit. Great community of experienced marketers from around the globe.
—
Can’t Decide Tracking Software?
Often I get asked which tracking software I prefer to use for tracking my campaigns. I used to be a p202 fanboy and use it exclusively, until I set my eyes upon CPVLab, which is now, to date, still my preferred method of tracking. You can get CPVLab here >> for around $300 .. any serious affiliate marketer will know that good tracking is a worthy investment!

















Latest Comments