Esempio n. 1
0
             $data['captcha_valid'] = $score;
         }
         break;
     case 'FunCaptcha':
         require_once "libs/funcaptcha.php";
         $funcaptcha = new FUNCAPTCHA();
         $data["captcha"] = $funcaptcha->getFunCaptcha($data["funcaptcha_public_key"]);
         if (array_key_exists('address', $_POST)) {
             $data['captcha_valid'] = $funcaptcha->checkResult($data["funcaptcha_private_key"]);
         }
         break;
 }
 $data['captcha_info'] = $captcha;
 # 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(5);
     // initial number of links min 3 - max 5
 }
 if ($data['captcha'] && $data['apikey'] && $data['rewards']) {
     $data['enabled'] = true;
 }
 // check if ip eligible
 $q = $sql->prepare("SELECT TIMESTAMPDIFF(MINUTE, last_used, CURRENT_TIMESTAMP()) FROM Faucetinabox_IPs WHERE ip = ?");
Esempio n. 2
0
try {
    $client = new SoapClient('https://api.epay.info/?wsdl');
} catch (Exception $e) {
    $client = new SoapClient('http://api.epay.info/?wsdl');
}
$blc = $client->f_balance($apicode, 1);
if ($blc >= 0) {
    if ($currency == 4) {
        $blc = convertToBTCFromSatoshi($blc);
    }
    $smarty->assign('faucet_balance', $blc . ' ' . currency($currency));
} else {
    $smarty->assign('faucet_balance', 'API NOT VALID');
}
if ($anti_bot && ($faucet_steps == 2 && isset($_POST['step2']) || $faucet_steps == 1)) {
    $antibotlinks = new antibotlinks(true);
    $antibotlinks->generate($anti_bot, true);
    $smarty->assign('abinf', $antibotlinks->show_info());
    switch ($anti_bot) {
        case 1:
            $smarty->assign('ab1', $antibotlinks->show_link());
            break;
        case 2:
            $smarty->assign('ab1', $antibotlinks->show_link());
            $smarty->assign('ab2', $antibotlinks->show_link());
            break;
        case 3:
            $smarty->assign('ab1', $antibotlinks->show_link());
            $smarty->assign('ab2', $antibotlinks->show_link());
            $smarty->assign('ab3', $antibotlinks->show_link());
            break;