From 179c9aac909234efbf31f805708272b7a62b3a47 Mon Sep 17 00:00:00 2001 From: Jos Poortvliet Date: Fri, 25 May 2018 00:48:44 +0200 Subject: disable reCaptcha Signed-off-by: Jos Poortvliet --- page-ordersubmit.php | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'page-ordersubmit.php') diff --git a/page-ordersubmit.php b/page-ordersubmit.php index c0b45647..6399c520 100644 --- a/page-ordersubmit.php +++ b/page-ordersubmit.php @@ -90,27 +90,27 @@ if(isset($_POST['email'])) { // if(strlen($comments) < 8) { // $error_message .= 'Your input is pretty short!
'; // } - if(RECAPTCHA_SECRET !== '' && isset($_POST['g-recaptcha-response'])) { - $url = 'https://www.google.com/recaptcha/api/siteverify'; - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('secret' => RECAPTCHA_SECRET, 'response' => $_POST['g-recaptcha-response']))); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - $server_output = curl_exec($ch); - - $server_output = json_decode($server_output, true); - - curl_close($ch); - - if (!isset($server_output['success']) || $server_output['success'] !== true) { - $error_message .= 'The captcha result was invalid.
'; - } - } else { - $error_message .= 'Captcha code is missing.
'; - } +// if(RECAPTCHA_SECRET !== '' && isset($_POST['g-recaptcha-response'])) { +// $url = 'https://www.google.com/recaptcha/api/siteverify'; +// $ch = curl_init(); +// +// curl_setopt($ch, CURLOPT_URL, $url); +// curl_setopt($ch, CURLOPT_POST, 1); +// curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('secret' => RECAPTCHA_SECRET, 'response' => $_POST['g-recaptcha-response']))); +// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +// +// $server_output = curl_exec($ch); +// +// $server_output = json_decode($server_output, true); +// +// curl_close($ch); +// +// if (!isset($server_output['success']) || $server_output['success'] !== true) { +// $error_message .= 'The captcha result was invalid.
'; +// } +// } else { +// $error_message .= 'Captcha code is missing.
'; +// } if ($terms !== 'yes') { $error_message .= '
  • Terms need to be signed.
  • '; -- cgit v1.2.3