芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/lavishbdlifestyle.com/app/Rules/Recaptcha.php
env('RECAPTCHA_SECRET_KEY'), 'response' => $value ); try { $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 = curl_exec($verify); return json_decode($response)->success; } catch (\Exception $e) { return false; } } /** * Get the validation error message. * * @return string */ public function message() { return 'reCAPTCHA verification failed.'; } }