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

Anyone know how to spoof Facebook referer?

Discussion in 'Cloaking and Content Generators' started by webhell, May 18, 2013.

  1. webhell

    webhell Registered Member

    Joined:
    Apr 25, 2013
    Messages:
    78
    Likes Received:
    20
    Been trying, and can't seem to find a way that stops the Facebook alert:

    "For the safety and privacy of your Facebook account ..."

    Then, if they click the Continue link, is from https now so no referer is sent.

    I tried searching this site (before anyone kicks off about that one) and despite there being several threads asking, only one has a positive response and I'm guessing that they didn't solve the OP's problem because they were still asking days later.
     
  2. WayneInc

    WayneInc Senior Member

    Joined:
    Sep 20, 2012
    Messages:
    1,178
    Likes Received:
    1,099
  3. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,066
    Likes Received:
    2,872
    Gender:
    Male
    The following code snippet should work:

    Code:
    <?
    
    $url = 'http://www.yourpage.com';
    
    // disguises the curl using fake headers and a fake user agent.
    function disguise_curl($url)
    {
      $curl = curl_init();
    
      // Setup headers - I used the same headers from Firefox version 2.0.0.6
      // below was split up because php.net said the line was too long. :/
      $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
      $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
      $header[] = "Cache-Control: max-age=0";
      $header[] = "Connection: keep-alive";
      $header[] = "Keep-Alive: 300";
      $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
      $header[] = "Accept-Language: en-us,en;q=0.5";
      $header[] = "Pragma: "; // browsers keep this blank.
    
      curl_setopt($curl, CURLOPT_URL, $url);
      curl_setopt($curl, CURLOPT_USERAGENT, 'Googlebot/2.1 
    
    (+http://www.google.com/bot.html)');
      curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
      curl_setopt($curl, CURLOPT_REFERER, 'http://www.google.com');
      curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
      curl_setopt($curl, CURLOPT_AUTOREFERER, true);
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($curl, CURLOPT_TIMEOUT, 10);
    
      $html = curl_exec($curl); // execute the curl command
      curl_close($curl); // close the connection
    
      return $html; // and finally, return $html
    }
    
    // uses the function and displays the text off the website
    $text = disguise_curl($url);
    echo $text;
    ?>
    
     
    • Thanks Thanks x 1
  4. TZ2011

    TZ2011 Senior Member

    Joined:
    Jun 26, 2011
    Messages:
    832
    Likes Received:
    864
    Occupation:
    Cleaning servers
    You can spoof referer but that means nothing if somebody want to check source of traffic. It is dead easy to check IP and host, for example, just a few lines of code in .php.
     
  5. hellnation

    hellnation Regular Member

    Joined:
    Feb 15, 2013
    Messages:
    278
    Likes Received:
    62
    Occupation:
    Senior Network and System Engineer
    Location:
    Quebec, Canada
    your spoofed ref need to look legit when they access it directly

    anyway, you can use fakereferer as suggested and look at how they are doing it.
     
  6. webhell

    webhell Registered Member

    Joined:
    Apr 25, 2013
    Messages:
    78
    Likes Received:
    20
    But they don't do Facebook? They only do ones anyone can do themselves? (Google/Stumble/Twitter/URL)
     
  7. webhell

    webhell Registered Member

    Joined:
    Apr 25, 2013
    Messages:
    78
    Likes Received:
    20
    To g0g0l:

    When I upload that code as a php file and run it (after changing the $url to my website obviously), it says "Bad Request". What am I missing?
     
  8. patricbr

    patricbr BANNED BANNED

    Joined:
    Aug 1, 2011
    Messages:
    31
    Likes Received:
    14
    Yeah i use them too.
    Be sure to use discount code: add25%
    That will give you 25% extra URL's for free

     
  9. webhell

    webhell Registered Member

    Joined:
    Apr 25, 2013
    Messages:
    78
    Likes Received:
    20
    Okay, so we get the point that "fakerefer.com is wonderful" ... thanks for that. Now, back to the actual topic of the thread - does any service/script refer FACEBOOK traffic?
     
  10. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,066
    Likes Received:
    2,872
    Gender:
    Male
    what happened to you? Why did you burn??
     
  11. plicpl1

    plicpl1 Newbie

    Joined:
    May 12, 2013
    Messages:
    10
    Likes Received:
    0
    How am I supposed to do this?
     
  12. webhell

    webhell Registered Member

    Joined:
    Apr 25, 2013
    Messages:
    78
    Likes Received:
    20
    fakereferer.com have a demo page. you can do look at the links and work out how to do it yourself.

    I'm assuming that no-one knows the answer to my question then? we're just going to talk about fakerefer and what they do ... i.e. everything you can do yourself. Not Facebook.