RECAPTCHA_SECRET_KEY, 'response' => $SecretKey ); $verify = curl_init(); curl_setopt($verify, CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify"); curl_setopt($verify, CURLOPT_POST, true); curl_setopt($verify, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($verify, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($verify, CURLOPT_RETURNTRANSFER, true); $response_data = curl_exec($verify); $response_data = json_decode($response_data); curl_close($verify); //echo "
"; print_r($response_data); echo "
"; return $response_data; } } ///////////////////////////// OR ///////////////////////////// /* class Captcha { public function getCaptcha($SecretKey) { $Resposta = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=" . RECAPTCHA_SECRET_KEY . "&response={$SecretKey}"); $Retorno = json_decode($Resposta); return $Retorno; } } */ if ($_SERVER['REQUEST_METHOD'] == 'POST') { //echo "
"; print_r($_REQUEST); echo "
"; $ObjCaptcha = new Captcha(); $Retorno = $ObjCaptcha->getCaptcha($_POST['g-recaptcha-response']); //echo "
"; print_r($Retorno); echo "
"; if ($Retorno->success) { echo '

CAPTCHA was completed successfully!

'; mail($to, $subject, $msgBody, $headers); } else { $error_codes = 'error-codes'; if (isset($Retorno->$error_codes) && in_array("timeout-or-duplicate", $Retorno->$error_codes)) { $captcha_msg = "The verification expired due to timeout, please try again."; } else { $captcha_msg = "Check to make sure your keys match the registered domain and are in the correct locations.
You may also want to doublecheck your code for typos or syntax errors."; } echo '

reCAPTCHA error: ' . $captcha_msg . '

'; } } ?>
Island Blue Pools
Call us Today at
832-475-7700

Contact Island Blue Custom Pools


By Phone: 832-475-7700
By Fax: 888-398-2058
By E-mail: info@islandbluepools.com
14403 Twisted Canyon
Cypress, TX 77429
by appointment only



Hayward Pool Products Association of Pool & Spa Professionals Hayward Energy Solutions Warranty Hayward Pool Products

Island Blue Custom Pools, 14403 Twisted Canyon Cypress, TX 77429 832-475-7700 info@islandbluepools.com

HOME     BACK TO TOP

© 2013 Island Blue Custom Pools. All Rights Reserved.