diff options
Diffstat (limited to 'page-contactsubmit.php')
-rw-r--r-- | page-contactsubmit.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/page-contactsubmit.php b/page-contactsubmit.php index bf2c6bfa..3eea2663 100644 --- a/page-contactsubmit.php +++ b/page-contactsubmit.php @@ -63,22 +63,22 @@ 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(strlen($error_message) > 0) { died($error_message); } else { |