recaptcha icon indicating copy to clipboard operation
recaptcha copied to clipboard

White page

Open razzerar opened this issue 5 years ago • 0 comments

Hi

In my file where i have the capatcha i have this code, but when i use it i get a white screen. Anyone know why ? using another version of the code works but not this one i want to switch to.

define('SECRET_KEY',"KEY")

	if (isset($_POST['g-recaptcha-response'])) {
		
		require('component/recaptcha/src/autoload.php');

			$recaptcha = new \ReCaptcha\ReCaptcha(SECRET_KEY);
			$resp = $recaptcha->setExpectedHostname('mysite.com')
                  ->verify($gRecaptchaResponse, $remoteIp);
			if ($resp->isSuccess()) {
			// Verified!
			} else {
			//Myerrror
			}
	
	}


razzerar avatar Dec 18 '20 18:12 razzerar