1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

simple question with php redirect script

Discussion in 'Cloaking and Content Generators' started by jaredakelly, Jan 14, 2010.

  1. jaredakelly

    jaredakelly Regular Member

    Joined:
    Jan 14, 2010
    Messages:
    376
    Likes Received:
    88
  2. something77

    something77 Registered Member

    Joined:
    Jan 6, 2010
    Messages:
    73
    Likes Received:
    10
    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
     
  3. shadowguy

    shadowguy Junior Member

    Joined:
    Nov 25, 2009
    Messages:
    125
    Likes Received:
    180
    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
     
  4. jaredakelly

    jaredakelly Regular Member

    Joined:
    Jan 14, 2010
    Messages:
    376
    Likes Received:
    88
    so what do i need to do?
     
  5. mdavis

    mdavis Newbie

    Joined:
    Nov 23, 2008
    Messages:
    48
    Likes Received:
    52
    use this cloacker instead, http://affiliateplex.com/tools/facebook-cloaker/, im planning to use this too to see if it works better