Re-Captcha implementation in php script help needed!

Discussion in 'PHP' started by harishtheprince, Nov 25, 2009.

  1. #1
    Hi,

    I have a site running with a php script for file downloads. But someone is abusing my script and bandwidth of my site Please help me out.

    I am ready to pay for this help.

    Please pm me for offers if you can do this in shortest possible time.

    Waiting for offers, :)
     
    Last edited: Nov 25, 2009
    harishtheprince, Nov 25, 2009 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    Are u giving direct links ?? or through through php ??
     
    Bohra, Nov 25, 2009 IP
  3. harishtheprince

    harishtheprince Active Member

    Messages:
    245
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    I have a script which fetches files from file hosting sites and then my site provides link to download using some random generated link.

    But the abuser is sending so many file download requests through different proxies that he wasted abt 100 gb bandwidth in just 1 hour or so..

    Please help me. Can u pm ur id?
     
    harishtheprince, Nov 25, 2009 IP
  4. org

    org Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You could use recaptcha.net its really easy to use, here I modified the default script a lil bit. It should work like that!

    
    <form action="" method="post">
    <?php
    
    require_once('recaptchalib.php');
    $publickey = "...";    //here you need to enter the publickey  
    $privatekey = "...";  //and the privatekey that you get from recaptcha.net
    
    
    $resp = null;
    $error = null;
    
    if ($_POST["submit"]) {
      $resp = recaptcha_check_answer ($privatekey,
                                      $_SERVER["REMOTE_ADDR"],
                                      $_POST["recaptcha_challenge_field"],
                                      $_POST["recaptcha_response_field"]);
    
      if ($resp->is_valid) {
    //Here you print the download link
    
          echo "<a href=\"http://www.linktodownloadfile.exe\">Download</a>";
         
        
    
      } else {
        
        $error = $resp->error;
      }
    }
    echo recaptcha_get_html($publickey, $error);
    ?>
        <br/>
        <input type="submit" name="submit" value="Download" />
        </form>
    
    PHP:
    org
     
    org, Nov 25, 2009 IP
  5. daman371

    daman371 Peon

    Messages:
    121
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    There's always a psuedorandom string generation. It's a pretty good option. You could also put in a download timeout check on the IP address. Say they dled a file 2 seconds ago then they can't download for xx more seconds. Let me know if you need help.
     
    daman371, Nov 25, 2009 IP
  6. kbduvall

    kbduvall Peon

    Messages:
    71
    Likes Received:
    3
    Best Answers:
    4
    Trophy Points:
    0
    #6
    You posted this already in a different forum. I suggested a honeypot technique. Read my original response at: Digital Point Forums > Design & Development > Site & Server Administration > Re-Captcha implementation in php script help needed!

    I can't post the regular link yet since my post count/member length is too low.
     
    kbduvall, Nov 27, 2009 IP