This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ include_once 'includes/dbconnect.php'; include "includes/cryptowallet-php-api/config.php"; include "includes/cryptowallet-php-api/lib/jsonRPCClient.php"; include "includes/cryptowallet-php-api/lib/Crypto.php"; $crypt = new Crypto_API($integrity_check, $settings, $server); //GOOGLE CAPTCHA $msg = ''; if ($_SERVER["REQUEST_METHOD"] == "POST") { $recaptcha = $_POST['g-recaptcha-response']; if (!empty($recaptcha)) { include "getCurlData.php"; $google_url = "https://www.google.com/recaptcha/api/siteverify"; $secret = 'Google Secret Key'; $ip = $_SERVER['REMOTE_ADDR']; $url = $google_url . "?secret=" . $secret . "&response=" . $recaptcha . "&remoteip=" . $ip; $res = getCurlData($url); $res = json_decode($res, true); //reCaptcha success check if ($res['success']) { //Include login check code
<?php include "cryptowallet-php-api/config.php"; include "cryptowallet-php-api/lib/jsonRPCClient.php"; include "cryptowallet-php-api/lib/Crypto.php"; $crypt = new Crypto_API($integrity_check, $settings, $server); if ($crypt->open_connection()) { echo $crypt->get_balance('faucet'); }
<?php include "config.php"; include "lib/jsonRPCClient.php"; include "lib/Crypto.php"; $crypt = new Crypto_API($integrity_check, $settings, $server); if ($crypt->open_connection()) { echo "connected<br />"; } else { echo "not connected<br />"; } //echo $crypt->generate_new_address('AKRQM'); echo $crypt->get_balance('AKRQM');
<?php include_once 'dbconnect.php'; include_once 'functions.php'; include "cryptowallet-php-api/config.php"; include "cryptowallet-php-api/lib/jsonRPCClient.php"; include "cryptowallet-php-api/lib/Crypto.php"; $crypt = new Crypto_API($integrity_check, $settings, $server); if ($crypt->open_connection()) { if (isset($_POST['faucet-pay'])) { $address = $_POST['faucet-pay']; $ip = getenv('HTTP_CLIENT_IP') ?: getenv('HTTP_X_FORWARDED_FOR') ?: getenv('HTTP_X_FORWARDED') ?: getenv('HTTP_FORWARDED_FOR') ?: getenv('HTTP_FORWARDED') ?: getenv('REMOTE_ADDR'); //VERIFY ADDRESS include 'address_check.php'; $validator = new ReddCoinAddressValidator(); $isValid = $validator->checkAddress($find); if (($isValid ? true : false) == true) { if (faucet($address, $ip, $mysqli) == $address) { if ($crypt->get_balance('faucet') > 5) { //SUCCESS $payout = $crypt->coin_to_satoshi(5); $crypt->sendfrom('faucet', $address, $payout); $now = time(); $mysqli->query("INSERT INTO payouts(address, ip, time) VALUES ('{$address}', '{$ip}', '{$now}')"); echo 'Success: You have been sent 5 RDD! Please wait atleast 12 hours before redeeming again'; } else { //faucet has less then 5 coins echo 'Error: Faucet to low'; } } else { if (faucet($address, $ip, $mysqli) == false) {