Skip to content

tyler-shaw/reCAPTCHA-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

reCAPTCHA-v2

Quick little PHP class for using the new version of reCAPTCHA

Example

<?php
	$secret_key = 'YOUR KEY';
	$public_key = 'YOUR KEY';
	
	$recaptcha = new reCAPTCHA($secret_key, $public_key);
	
	if(!empty($_POST)) {
		if($recaptcha->isValid()) {
			echo 'Valid Captcha<br>';
		}
		else {
			echo 'Invalid Captcha<br>';
		}
	}
	
?>
<!DOCTYPE html>
<html>
	<head>
		<title>Recaptcha Test</title>
		<?php $recaptcha->outputApi() ?>
	</head>
	<body>
		Recaptcha Test: <br>
		<form method="post" action="">
			<?php $recaptcha->outputCaptcha() ?>
			<input type="submit">
		</form>
	</body>
</html>

About

Quick little PHP class for using the new version of reCAPTCHA

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages