php - file_get_contents(https://www.google.com/recaptcha/api/siteverify): failed to open stream: in laravel project
one text
It's working fine yesterday but today's it's not working and showing this error in my Laravel project.
Error: file_get_contents(https://www.google.com/recaptcha/api/siteverify): failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
I'm using "google/recaptcha": "~1.1" for Google-captcha implementation.
My code for verifying Google Recaptcha
public function passes($attribute, $value)
{
$reCaptchha = new ReCaptcha(env('GOOGLE_RECAPTCHA_SECRET'));
$response = $reCaptchha->verify($value,$_SERVER['REMOTE_ADDR']);
return $response->isSuccess();
}
Please help me for remove this error.
Source