Useful Cloaking Script
By peter.stilgoe
$cloaked_url = "http://www.google.com"; // devs go here
$normal_url = "http://www.yahoo.com"; // everyone else goes here
$tracking_ref = $_SERVER['HTTP_REFERER'];
if(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 );
}
?>
Youl see that mods from facebook flyers will see the page you WANT THEM TO SEE to get your flyers approved, everyone else will go to your highly tuned landing page…..
***Note: Make sure when using scripts that modify headers, to remove any whitespace outside the PHP tags or you will get an error.
Source & thanks to www.nickycakes.com
More From pstilgoe



December 20th, 2007
