#ZZZ$2 $amt_ts = 9.95; $amt_ts = 2.00; $amt_ts = 4.95; $amt_ts = 249.95; $amt_ts = 24.95; $amt_full = 24.95; $amt_full = 14.95; $amt_full = 2499.95; $amt_full = 249.95; // aburt's quickie recaptcha v2 lib for php, like turing.pl require_once('/home/httpd/lib/recaptcha-master/src/autoload.php'); function _captcha_key($which) { if ($which == "pub") return '6LcGYzYUAAAAAMWzJY6KhafsQQUV-CqoBErwTzrH'; if ($which == "priv") return '6LcGYzYUAAAAAHrOwWveDP79JiudQsCi-jS25Nsb'; } function turing_test() { $key = _captcha_key("pub"); return "
"; } function not_human($errormsg) { $response = $_POST['g-recaptcha-response']; require_once('/home/httpd/lib/recaptcha2.php'); $remoteIp = $_SERVER['REMOTE_ADDR']; $secret = _captcha_key("priv"); $recaptcha = new \ReCaptcha\ReCaptcha($secret); $resp = $recaptcha->verify($response, $remoteIp); if ($resp->isSuccess()) { // verified! // if Domain Name Validation turned off don't forget to check hostname field // if($resp->getHostName() === $_SERVER['SERVER_NAME']) { } return ""; } else { $errors = $resp->getErrorCodes(); #echo "Uh oh -- $errors"; #print_r($errors); if ($errormsg) error($errormsg); // assumes error() is defined, e.g. in ht.pl return($errors[0]); // else will just return a code } } function not_human_error($errormsg) { // call not_human and definitely call error() if fails # $errormsg is optional, call error(msg) if present, else error(default msg) if ($errormsg == "") $errormsg = "Are you human? Go back and try that again"; not_human($errormsg); // will exit via error() } ?>
|