UserConfig::get('recaptcha_secret_key'), 'response' => $response, 'remoteip' => $clientIpAddress )); $return = json_decode(curl_exec($ch)); if (is_null($return)) { throw new \Exception('Error while communicating with the reCAPTCHA service.'); } return $return->success; } }