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

  • Share/Bookmark


About... peter.stilgoe

This author published 368 posts in this site.
Sharepoint, InfoPath, K2, Nintex, Business Process Mapping, Business Intelligence, Automation, ECM, Document Management, Document Imaging, Internet Marketing & Online Business Consultant Email / MSN: pstilgoe@hotmail.com LinkedIn: Pete Stilgoe - Sharepoint Consultant











Share

FacebookTwitterEmailWindows LiveTechnoratiDeliciousDiggStumbleponMyspaceLikedin

You must be logged in to send a comment.