FB Cloaking for a retard

Status
Not open for further replies.

mattonitto

So not gangster....
Oct 30, 2007
160
3
0
Using the FB cloaking from Nickycakes:

Code:
<?php
  $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 );
  }
?>
Who else from the FB team should I be redirecting besides just dev.facebook and how do I add it to the PHP? Thanks in advance for any all help.
 


Using the FB cloaking from Nickycakes:

Code:
<?php
  $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 );
  }
?>
Who else from the FB team should I be redirecting besides just dev.facebook and how do I add it to the PHP? Thanks in advance for any all help.

I don't condone cloaking, not like you need to anymore for most stuff anyway, but the PHP aspect interested me :)

<?php
$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") || strpos($tracking_ref,"intern.facebook")){
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: " . $cloaked_url );
} else {
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: " . $normal_url );
}
?>

that covers what I know.
 
Status
Not open for further replies.