05
Cloaking Facebook Landing Pages
Posted by admin | Posted in Cloaking, Facebook | Posted on 05-10-2008
As per my previous post, I said I would post the Facebook cloaking script I use to send the editors(interns) to a different page than I send users. You don’t just use this for risque dating offers, it also works really well for Zip/Email submits. Facebook doesn’t allow you to advertise for those offers, as it requires users to input personal information, so you have to cloak to run them. Same goes for dieting offers, as Facebook has really cracked down on those as well.
I originally got this script from Nickycakes, then I modified it to include the second referral source once editors started to come from intern.facebook.com. This script won’t work every time, as often times editors will input the URL directly to test it, they have caught onto our cloaking, but try submitting it a few times and it will go through. Also, be choosy about what you cloak to, they know you aren’t really advertising for cnn.com or google.com.
<?php
$cloaked_url = "http://www.entercloakedurlhere.com"; // devs go here
$normal_url = "http://www.enteruserurlhere.com"; // everyone else goes here
$tracking_ref = $_SERVER['HTTP_REFERER'];
if(strpos($tracking_ref,”intern.facebook”) || strpos($tracking_ref,”dev.facebook”)){
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: ” . $cloaked_url );
} else {
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: ” . $normal_url );
}
?>
Like I said, this script works for me, I might have to change it some as they become more savvy, but it is good for now (and simple).




