Anyone know how to spoof Facebook referer?

webhell

Junior Member
Joined
Apr 25, 2013
Messages
118
Reaction score
29
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.
 
this works pretty well for you..

http://fakereferer.com/

Thanks
 
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;
?>
 
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.
 
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.
 
this works pretty well for you..

fakereferer .com

Thanks

But they don't do Facebook? They only do ones anyone can do themselves? (Google/Stumble/Twitter/URL)
 
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?
 
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?
 
How am I supposed to do this?

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.
 
Back
Top