Protect your Bitcoin faucet from cheaters and bots .

Bitcoin , ,

After creating a faucet website it’s very hard to maintain it . Creating a faucet does not take more then 5-10 minutes but marketing of faucet and then maintaining it for a long term is very hard job.

Daily many faucets are created , I can see every day 4-5 new threads with “ANN” tag are posted by users in bitcointalk forum to intoroduce their new faucet site with public but how many faucets last long or servive a better life ? I know most faucets dies within a week or a month . I think you should read some tips about how to maintain a faucet site .

Most faucet websites get closed because of cheaters or bot attacks . Cheaters claim multiple times with different ip address breaking the rule of your faucet timer or they may use automated software (bot) to claim free satoshi from your faucet in both case you’ll lose money from your pocket and cheaters or bot users will drain your pocket (bitcoin balance) .Through this post I want to share few tips about how to protect your bitcoin faucet from bots and cheaters .

Using Antibot Link Script

Probably you might have seen a feature on some faucet “Click following links in following order” actually that’s antibot link script . Thanks to who created this script and shared it for free for public use . The main purpose of this script is to keep every faucet unique . How antibot script makes every faucet unique ? Actually this script was coded for faucetbox faucet script , faucetbox faucet script is free open source faucet script so cheaters know the technique to automate the process of claiming free satoshi from faucet but if antibot link script is installed and new unique puzzels are created then it’ll be hard for bots to work similarly for same type of faucet script.

How to install antibot link script ?

It’s very easy to install antibot links for faucetbox faucet script but if you want to use it in other script you can do it by doing some modifications .Please take backup of your site before doing any modification .

  1. First download antibotlink script and unzip it .
  2. Now add the file antibotlinks.php in libs folder .
  3. Now go to /templates/theme-name/index.php here we’ll edit index.php file later keep it open in a editor .
  4. Open index.php [it’s main index.php file] file in editor find this line $data[‘captcha_info’] = $captcha;  and just after this line add this code # AntiBotLinks
    $antibotlinks = new antibotlinks(true);// true if GD is on on the server, false is less secure
    if (array_key_exists(‘address’, $_POST)) {
    if (!$antibotlinks->check()) {
    $antibotlinks->generate(5, true);// number of links once they fail to solve min 3 – max 5, the second param MUST BE true
    } else {
    $antibotlinks->generate(3);// initial number of links min 3 – max 5
  5. Now let’s find this line $data[‘captcha_valid’] && and just after this line add # AntiBotLinks
    $antibotlinks->is_valid() &&
  6. As I said in the step 3 we’ll edit /templates/theme-name/index.php file here .
  7. Find the tag <head></heaad> between this tag add this code <?php
    # AntiBotLinks START
    <script style=”text/javascript”>
    $(function() {
    var clicks = 0;
    $(‘.antibotlinks’).click(function() {
    $(‘#antibotlinks’).val($(‘#antibotlinks’).val()+’ ‘+$(this).attr(‘rel’));
    if(clicks == <?php echo $antibotlinks->get_link_count(); ?>) {
    var rand = Math.floor((Math.random() * clicks) + 1);
    var button = ‘<input type=”submit” class=”btn btn-primary btn-lg” value=”Get Reward!”>’;
    var z=0;
    if (z==rand) {
    return false;
    # AntiBotLinks END
  8. Now we’ll find the code <?php if(!$data[“captcha_valid”]): ?>
    <p class=”alert alert-danger”>Invalid captcha code!</p>
    <?php endif; ?> 
    and just after this code between <form> and </form>  add this code <?php
    # AntiBotLinks START
                                <input type=”hidden” name=”antibotlinks” id=”antibotlinks” value=”” />
                                <?php if(!$antibotlinks->is_valid()): ?>
                                <p class=”alert alert-danger”>Invalid AntiBot verification!</p>
                                <?php endif; ?>
    # AntiBotLinks END
  9. After the next <div> tag add this code <?php
    # AntiBotLinks START
    <?php echo $antibotlinks->show_info(); ?>
    # AntiBotLinks END
  10. Again between <form> and </form> add this code 5 times <?php
    # AntiBotLinks START
    <?php echo $antibotlinks->show_link(); ?>
    # AntiBotLinks END
  11. Now finally you can remove default claim button .
  12. Now it’s upto you , you should create unique logical puzzles otherwise bots will bypass antibot links . To edit logical puzzles just open antibotlinks.php in editor and edit the lines from 32-38 .

Adding Antiadblock Script

Normally bots try to load minimal contents and they may disable javascript so we should install antiadblock script to tell users to disable adblocker . There are may antiadblocker scripts are available you can search on google . You can use any antiadblocker that’s not the metter because main aim to use it is to tell users to enable javascript in their browser .

Adding Proxy Blocker

Many cheaters use proxy service or vpn to change their ip address and claim multiple times from faucet so we can block proxy users from accessing our faucet page .

  1. First open /templates/theme-name/index.php file in editor and add this code before <Doctypehtml> tag
  2. //We do not allow proxy
    if(@fsockopen($_SERVER[‘REMOTE_ADDR’], 80, $errstr, $errno, 1)) {      
    die(sorry proxy not allowed on this page.Please disable proxy setting and reload this page .)           }
  3. Now in the public_html edit .htaccess file and put this RewriteEngine on
    RewriteCond %{HTTP:VIA} !^$ [OR]
    RewriteCond %{HTTP:FORWARDED} !^$ [OR]
    RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
    RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
    RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
    RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
    RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
    RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
    RewriteRule ^(.*)$ – [F]
  4. That’s all done I hope this article will help you to fight with scammers and cheaters .

About Author:

I'm Bitcoin enthusiast I believe crypto technology will change the world fully in near future - the way of doing business , the way of buying goods and services . Bitcoin is already playing it's role but more crypto coins will be developed in the future . The crypto technology will change whole economy the world . I started my 1st faucet with ugly look and design but I sold that to someone and created this blog with a faucet page . I'm not a good writer basically my English sucks but I still write to share tips , ideas , thoughts , reviews .

Leave a Reply

Your email address will not be published. Required fields are marked *