diff options
author | Jos Poortvliet <jospoortvliet@gmail.com> | 2018-05-25 01:48:44 +0300 |
---|---|---|
committer | Jos Poortvliet <jos@opensuse.org> | 2018-05-25 01:59:47 +0300 |
commit | 179c9aac909234efbf31f805708272b7a62b3a47 (patch) | |
tree | 98c5824eb52bc974ce0c81968b3796197cf25867 /page-ordersubmit.php | |
parent | 62a58feadeff7a71f708f0f7e6e98614ce4a8f9c (diff) |
disable reCaptcha
Signed-off-by: Jos Poortvliet <jospoortvliet@gmail.com>
Diffstat (limited to 'page-ordersubmit.php')
-rw-r--r-- | page-ordersubmit.php | 42 |
1 files changed, 21 insertions, 21 deletions
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! <br />'; // } - 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.<br />'; - } - } else { - $error_message .= 'Captcha code is missing.<br />'; - } +// 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.<br />'; +// } +// } else { +// $error_message .= 'Captcha code is missing.<br />'; +// } if ($terms !== 'yes') { $error_message .= '<li>Terms need to be signed.</li>'; |