simple question with php redirect script

Place the code at the very top of the page, before anything
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 );
  }
?>

There must be nothing before this code on your page otherwise the header code won't work
 
Place the code at the very top of the page, before anything
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 );
  }
?>
There must be nothing before this code on your page otherwise the header code won't work

LOL you need far more then that.
FAR FAR more, at least cloak for all the northen california IP ranges where facebook has its offices. and that would not be enough too
 
LOL you need far more then that.
FAR FAR more, at least cloak for all the northen california IP ranges where facebook has its offices. and that would not be enough too

so what do i need to do?
 
Back
Top