Best Blackhat Forum

Full Version: Fake Referrer Header and Change User Agent String Script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
PHP Code:
<?php


// The domain we want to connect to

$host "www.scanmybrowser.com"

// Page we want to POST or GET

$page "index.php";

// The list of our fake referer urls

$file "urls.txt";
$fp file($file);
srand((double)microtime()*1000000);
$urls $fp[array_rand($fp)];



// construct a header for our request still need to add all headers and random user Agents

$hdrs = array( 'http' => array(

    
'method' => "GET",



    
'header'=> "accept-language: en\r\n" 

        
"Host: $host\r\n" .

        
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:x.x.x) Gecko/20041107 Firefox/x.x\r\n" .

        
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n" .

        
"Referer: $urls\r\n" .  // Setting the http-referer

        
"Content-Type: text/html\r\n" .

        
"Content-Length: 33\r\n\r\n" .

        
"Keep-Alive: 300\r\n"

    
)

);



// get the requested page from the server

// with our header as a request-header



$context stream_context_create($hdrs);

$fp fopen("http://" $host "/" $page'r'false$context);

fpassthru($fp);

fclose($fp);

?>

I'll share more helpful information/guide soon. [Image: smile.gif]
Press THANKS or REP me if you found it useful. [Image: cool.gif]
Good job man
was tested with adsense?
hy dude, i don't understand.
can you create video tutorial..
thanks a lot.
can u upload video tut..for this plz
can we use this for youtube views ??
Reference URL's