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

Link Exchange Boosting

Discussion in 'Black Hat SEO Tools' started by ph33nd, Apr 18, 2008.

  1. ph33nd

    ph33nd Newbie

    Joined:
    Apr 11, 2008
    Messages:
    45
    Likes Received:
    2
    Home Page:
    I got something cool for you guys that I just wrote. I've been trying to boost my site returns and move my links up in link exchanges and wrote a simple php script to create pretty much as many hits as you like to a site you have a link exchange with via a simple get request.

    The code is below and all you have to do is upload the script and the usage is simply:

    hxxp://www.yoursite.com/script.php?url={someUrl}&hits={# of hits to site}

    Just modify the $r variable at the bottom to be from your site and that should take care of it. More to come.

    PHP:
    <?php
    function open_page($url,$f=1,$c=2,$r=0,$a=0,$cf=0,$pd=""){
     global 
    $oldheader;
     
    $url str_replace("http://","",$url);
     if (
    preg_match("#/#","$url")){
      
    $page $url;
      
    $url = @explode("/",$url);
      
    $url $url[0];
      
    $page str_replace($url,"",$page);
      if (!
    $page || $page == ""){
       
    $page "/";
      }
      
    $ip gethostbyname($url);
     }else{
      
    $ip gethostbyname($url);
      
    $page "/";
     }
     
    $open fsockopen($ip80$errno$errstr60);
     if (
    $pd){
      
    $send "POST $page HTTP/1.0\r\n";
     }else{
      
    $send "GET $page HTTP/1.0\r\n";
     }
     
    $send .= "Host: $url\r\n";
     if (
    $r){
      
    $send .= "Referer: $r\r\n";
     }else{
      if (
    $_SERVER['HTTP_REFERER']){
       
    $send .= "Referer: {$_SERVER['HTTP_REFERER']}\r\n";
      }
     }
     if (
    $cf){
      if (@
    file_exists($cf)){
       
    $cookie urldecode(@file_get_contents($cf));
       if (
    $cookie){
        
    $send .= "Cookie: $cookie\r\n";
        
    $add = @fopen($cf,'w');
        
    fwrite($add,"");
        
    fclose($add);
       }
      }
     }
     
    $send .= "Accept-Language: en-us, en;q=0.50\r\n";
     if (
    $a){
      
    $send .= "User-Agent: $a\r\n";
     }else{
      
    $send .= "User-Agent: {$_SERVER['HTTP_USER_AGENT']}\r\n";
     }
     if (
    $pd){
      
    $send .= "Content-Type: application/x-www-form-urlencoded\r\n"
      
    $send .= "Content-Length: " .strlen($pd) ."\r\n\r\n";
      
    $send .= $pd;
     }else{
      
    $send .= "Connection: Close\r\n\r\n";
     }
     
    fputs($open$send);
     while (!
    feof($open)) {
      
    $return .= fgets($open4096);
     }
     
    fclose($open);
     
    $return = @explode("\r\n\r\n",$return,2);
     
    $header $return[0];
     if (
    $cf){
      if (
    preg_match("/Set\-Cookie\: /i","$header")){
       
    $cookie = @explode("Set-Cookie: ",$header,2);
       
    $cookie $cookie[1];
       
    $cookie explode("\r",$cookie);
       
    $cookie $cookie[0];
       
    $cookie str_replace("path=/","",$cookie[0]);
       
    $add = @fopen($cf,'a');
       
    fwrite($add,$cookie,strlen($read));
       
    fclose($add);
      }
     }
     if (
    $oldheader){
      
    $header "$oldheader<br /><br />\n$header";
     }
     
    $header str_replace("\n","<br />",$header);
     if (
    $return[1]){
      
    $body $return[1];
     }else{
      
    $body "";
     }
     if (
    $c === 2){
      if (
    $body){
       
    $return $body;
      }else{
       
    $return $header;
      }
     }
     if (
    $c === 1){
      
    $return $header;
     }
     if (
    $c === 3){
      
    $return "$header$body";
     }
     if (
    $f){
      if (
    preg_match("/Location\:/","$header")){
       
    $url = @explode("Location: ",$header);
       
    $url $url[1];
       
    $url = @explode("\r",$url);
       
    $url $url[0];
       
    $oldheader str_replace("\r\n\r\n","",$header);
       
    $l "Location:";
       
    $oldheader str_replace("Location:",$l,$oldheader);
       return 
    open_page($url,$f,$c,$r,$a,$cf,$pd);
      }else{
       return 
    $return;
      }
     }else{
      return 
    $return;
     }
    }
    /////////////
    ////Usage////
    /////////////
    $url $_GET['url'];
    $f 1;
    $c 1;//1 for header, 2 for body, 3 for both
    $r "www.yoururl.com"/////// CHANGE ME FOR REFERRER TAG....
    $a NULL;
    $cf NULL;
    $pd NULL;
    $hits $_GET['hits'];
    $msg "Sending $hits requests to $url from $r:<hr>";
    echo 
    $msg;
    for(
    $i=0;$i<$hits;$i++){
    $page open_page($url,$f,$c,$r,$a,$cf,$pd);
    if(
    $page!=""){
        if(((
    $i+1)%10)==0){
        
    sleep(1);
        echo 
    "Load ".($i+1)."<BR>";
        
    flush();
        
    ob_flush();
        }
    }
        
    }
    ?>
     
    • Thanks Thanks x 1
  2. interpro

    interpro Registered Member Premium Member

    Joined:
    Feb 27, 2008
    Messages:
    92
    Likes Received:
    210
    Home Page:
    Hey ph33nd,

    Nice clean code. I'll be looking forward to more such php from you.

    Keep up the good work!
     
  3. dspa72

    dspa72 Junior Member

    Joined:
    Mar 31, 2008
    Messages:
    104
    Likes Received:
    16
    Home Page:
    Hi ph33nd, can you suggest a good link exchange service which works fine with your script?
     
  4. ph33nd

    ph33nd Newbie

    Joined:
    Apr 11, 2008
    Messages:
    45
    Likes Received:
    2
    Home Page:
    Yeah., pretty much anything that tracks hits via referrer in the http header or a get request like http://www.exchangesite.com/?affid=1234 or just about anything like that. If you'd like to see an ajax enabled version that pulls from my database of user ips and user agents that visit my site check out hxxp://linkpwn.byte-space.com/ I'm working on enabling hits via proxy servers that would forward via x-forwarded for, but atm im strapped for time :)
     
  5. Wintermute

    Wintermute Junior Member

    Joined:
    Mar 10, 2008
    Messages:
    110
    Likes Received:
    1
    Hmm, does most topsite software protect against attacks like this, or no?
     
  6. hotstox

    hotstox Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 14, 2007
    Messages:
    275
    Likes Received:
    86
    depends on the niche, I know adult looks for productivity of clicks and auto bans trades
     
  7. tcflying

    tcflying Guest

    thx for share the code.