- And, replace with the following code:
//verify captcha
require_once("captchme-lib.php");
$privateKey = "YOUR PRIVATEKEY";
$authenKey = "YOUR AUTHENKEY";
if (isset($_POST["captchme_response_field"])) {
$remoteIp = $_SERVER["REMOTE_ADDR"];
$response = captchme_verify ($privateKey,
$_POST["captchme_challenge_field"],
$_POST["captchme_response_field"],
$remoteIp,
$authenKey);
if ($response->is_valid) {
// your form management code
sleep(rand(1,10));
$timer = $faucet_timer * 60;
$addy = $_POST["addy"]; //get addy
$ref = $_POST["ref"]; //get ref addy
$opt = $_POST["option"]; //get option
$time_addy = "../$db_name/addy/$addy.xxx"; //time of addy
$time_ip = "../$db_name/ip/$userip.xxx"; //time of ip
$ref_file = "../$db_name/ref/$addy.xxx"; //store ref
if (!file_exists($time_addy)) {
$write_addy = fopen($time_addy, "w");
fclose($write_addy);
}
if (!file_exists($time_ip)) {
$write_ip = fopen($time_ip, "w");
fclose($write_ip);
}
if (!file_exists($ref_file) && !empty($ref)) {
$crt_rf = fopen($ref_file, "w");
fwrite($crt_rf, $ref);
fclose($crt_rf);
}
if (file_exists($ref_file)) {
$xref = file_get_contents($ref_file);
$ref = $xref;
}
$btc = "BTC";
if (file_exists($time_addy) && file_exists($time_ip)) {
$open_addy = file_get_contents($time_addy);
$open_ip = file_get_contents($time_ip);
if (empty($open_addy) && empty($open_ip)) {
if ($opt == "fh") {
require_once("send_fh.php");
} elseif ($opt == "fs") {
require_once("send_fs.php");
} else {
$msg = "Fuck you";
header('Location: ../index.php?msg='.$msg.'');
}
}
if (!empty($open_ip) && !empty($open_addy)) {
$t_addy = time() - $open_addy; //verify time in addy
$t_ip = time() - $open_ip; //verify time in ip
if ($t_addy > $timer && $t_ip > $timer) {
if ($opt == "fh") {
require_once("send_fh.php");
} elseif ($opt == "fs") {
require_once("send_fs.php");
}
} else {
if ($t_addy < $timer) {
$te = $timer - $t_addy; //verify addy time
$tem = intval($te / 60);
$msg = "You must have to wait $tem minutes before next claim.";
header('Location: ../index.php?msg='.$msg.'');
} elseif ($t_ip < $timer) {
$te = $timer - $t_ip; //verify ip time
$tem = intval($te / 60);
$msg = "Your IP will be available for next claim after $tem minutes.";
header('Location: ../index.php?msg='.$msg.'');
}
}
}
if (!empty($open_ip) && empty($open_addy)) {
$t_ip = time() - $open_ip; //verify time in ip
if ($t_ip > $timer) {
if ($opt == "fh") {
require_once("send_fh.php");
} elseif ($opt == "fs") {
require_once("send_fs.php");
}
} elseif ($t_ip < $timer) {
$te = $timer - $t_ip; //verify ip time
$tem = intval($te / 60);
$msg = "Your IP will be available for next claim after $tem minutes.";
header('Location: ../index.php?msg='.$msg.'');
}
}
if (empty($open_ip) && !empty($open_addy)) {
$t_addy = time() - $open_addy; //verify time in addy
if ($t_addy > $timer) {
if ($opt == "fh") {
require_once("send_fh.php");
} elseif ($opt == "fs") {
require_once("send_fs.php");
}
} elseif ($t_addy < $timer) {
$te = $timer - $t_addy; //verify addy time
$tem = intval($te / 60);
$msg = "You must have to wait $tem minutes before next claim.";
header('Location: ../index.php?msg='.$msg.'');
}
}
}
} else {
//display error message
$msg = "Your Captcha Was Invalid.";
header('Location: ../index.php?msg='.$msg.'');
}
} else {
header('Location: ../index.php');
}
?>
- Input: YOUR PRIVATEKEY and YOUR AUTHENKEY.
- Save.
Thats all, test if it works.
DEMO LINKend . . .