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 bit.makejar.com 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 .
- First download antibotlink script and unzip it .
- Now add the file antibotlinks.php in libs folder .
- Now go to /templates/theme-name/index.php here we’ll edit index.php file later keep it open in a editor .
- 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
require_once(‘libs/antibotlinks.php’);
$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
} - Now let’s find this line $data[‘captcha_valid’] && and just after this line add # AntiBotLinks
$antibotlinks->is_valid() && - As I said in the step 3 we’ll edit /templates/theme-name/index.php file here .
- 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() {
clicks++;
$(‘#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;
$(‘.antibotlinks’).each(function(){
z++;
if (z==rand) {
$(this).replaceWith(button);
}
});}
$(this).hide();
return false;
});
});
</script>
<?php
# AntiBotLinks END
?> - 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; ?>
<?php
# AntiBotLinks END
?> - After the next <div> tag add this code <?php
# AntiBotLinks START
?>
<?php echo $antibotlinks->show_info(); ?>
<?php
# AntiBotLinks END
?> - Again between <form> and </form> add this code 5 times <?php
# AntiBotLinks START
?>
<?php echo $antibotlinks->show_link(); ?>
<?php
# AntiBotLinks END
?> - Now finally you can remove default claim button .
- 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 .
- First open /templates/theme-name/index.php file in editor and add this code before <Doctypehtml> tag
- //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 .) } - 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] - That’s all done I hope this article will help you to fight with scammers and cheaters .