cURL php fake referer
2013-08-24, 03:10 AM,
#1
Someone can give me an example to faking referer please ?

(Sorry for my bad english :) )
Reply
2013-08-24, 03:33 AM,
#2
PHP Code:
<?php

$url 
"http://www.blabla.com";

function 
doMagic($url)
{
  
$curl curl_init();

  
$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: ";

  
curl_setopt($curlCURLOPT_URL$url);
  
curl_setopt($curlCURLOPT_USERAGENT"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.12011-10-16 20:23:00");
  
curl_setopt($curlCURLOPT_HTTPHEADER$header);
  
curl_setopt($curlCURLOPT_REFERER"http://www.fakeRef.com");
  
curl_setopt($curlCURLOPT_ENCODING"gzip,deflate");
  
curl_setopt($curlCURLOPT_AUTOREFERERtrue);
  
curl_setopt($curlCURLOPT_RETURNTRANSFER1);
  
curl_setopt($curlCURLOPT_TIMEOUT10);

  
$html curl_exec($curl);
  echo 
'Curl error: 'curl_error($curl);
  
curl_close($curl);

  return 
$html;

Latest Thanks - View all

xakaa(2013-08-24 03:56 AM) 
Reply
2013-08-24, 03:39 AM, (This post was last modified: 2013-08-24, 03:56 AM by xakaa.)
#3
(2013-08-24, 03:33 AM)-qwerty- Wrote:
PHP Code:
<?php

$url 
"";

function 
doMagic($url)
{
  
$curl curl_init();

  
$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: ";

  
curl_setopt($curlCURLOPT_URL$url);
  
curl_setopt($curlCURLOPT_USERAGENT"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.12011-10-16 20:23:00");
  
curl_setopt($curlCURLOPT_HTTPHEADER$header);
  
curl_setopt($curlCURLOPT_REFERER"");
  
curl_setopt($curlCURLOPT_ENCODING"gzip,deflate");
  
curl_setopt($curlCURLOPT_AUTOREFERERtrue);
  
curl_setopt($curlCURLOPT_RETURNTRANSFER1);
  
curl_setopt($curlCURLOPT_TIMEOUT10);

  
$html curl_exec($curl);
  echo 
'Curl error: 'curl_error($curl);
  
curl_close($curl);

  return 
$html;


thank you, I'll try

EDIT : it's work thanks
Reply
2013-10-17, 01:04 AM,
#4
(2013-08-24, 03:33 AM)-qwerty- Wrote:
PHP Code:
<?php

$url 
"";

function 
doMagic($url)
{
  
$curl curl_init();

  
$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: ";

  
curl_setopt($curlCURLOPT_URL$url);
  
curl_setopt($curlCURLOPT_USERAGENT"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.12011-10-16 20:23:00");
  
curl_setopt($curlCURLOPT_HTTPHEADER$header);
  
curl_setopt($curlCURLOPT_REFERER"");
  
curl_setopt($curlCURLOPT_ENCODING"gzip,deflate");
  
curl_setopt($curlCURLOPT_AUTOREFERERtrue);
  
curl_setopt($curlCURLOPT_RETURNTRANSFER1);
  
curl_setopt($curlCURLOPT_TIMEOUT10);

  
$html curl_exec($curl);
  echo 
'Curl error: 'curl_error($curl);
  
curl_close($curl);

  return 
$html;


hey bro, thanks for code but codes not working for me. page not opening.
Reply
2013-10-17, 03:06 AM,
#5
(2013-10-17, 01:04 AM)zamburlu Wrote:
(2013-08-24, 03:33 AM)-qwerty- Wrote:
PHP Code:
<?php

$url 
"";

function 
doMagic($url)
{
  
$curl curl_init();

  
$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: ";

  
curl_setopt($curlCURLOPT_URL$url);
  
curl_setopt($curlCURLOPT_USERAGENT"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.12011-10-16 20:23:00");
  
curl_setopt($curlCURLOPT_HTTPHEADER$header);
  
curl_setopt($curlCURLOPT_REFERER"");
  
curl_setopt($curlCURLOPT_ENCODING"gzip,deflate");
  
curl_setopt($curlCURLOPT_AUTOREFERERtrue);
  
curl_setopt($curlCURLOPT_RETURNTRANSFER1);
  
curl_setopt($curlCURLOPT_TIMEOUT10);

  
$html curl_exec($curl);
  echo 
'Curl error: 'curl_error($curl);
  
curl_close($curl);

  return 
$html;


hey bro, thanks for code but codes not working for me. page not opening.

well, put some url in the $url='' at first line..
Reply
2013-10-21, 10:00 AM,
#6
Then make it choose a random user agent would be next :P
Reply
2013-10-22, 03:01 AM,
#7
Randomize both the fake referer URL & the User agent!!

Also try to use proxy!!!
Reply
2013-11-23, 01:18 PM,
#8
Like suggested above, array to randomize user agents would be god idea... but still, if someone want to check rDNS, he will see the real host, you can't fake it for serious stuff where people are checking traffic, and that would be cpa and affiliate companies and managers, for example.
Reply
2013-11-23, 11:36 PM,
#9
You can still fake a referer with a double meta refresh..
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Fake Generator martek 1 573 2017-06-01, 02:02 AM
Last Post: iSee3D
  Help Needed CPAgrip php script takumi 4 843 2017-01-24, 04:47 AM
Last Post: takumi
  SOME DATA IS NOT BEING INSERTED TO MYSQL DATABASE WITH PHP QwertySon 2 1,167 2016-11-21, 02:52 PM
Last Post: QwertySon
  php + mysql , I need help t0ks1ck 4 1,059 2016-09-19, 01:55 AM
Last Post: styx
  need a php line help t0ks1ck 8 1,057 2016-09-08, 09:01 PM
Last Post: styx





About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top