0
点赞
收藏
分享

微信扫一扫

PHP使用谷歌验证码 提供下载


获取地址:​​http://code.google.com/p/cool-php-captcha/​​   

 


El objetivo de este proyecto es la generación de captchas de seguridad básica generando imágenes relativamente amigables para el usuario.

Example

This project provides the SimpleCaptcha

The images are similar to google captchas.

Basic example:

session_start();
$captcha = new SimpleCaptcha();
// Change configuration...
//$captcha->wordsFile = null; // Disable dictionary words
//$captcha->wordsFile = 'words/es.txt'; // Enable spanish words
//$captcha->session_var = 'secretword'; // Change session variable
$captcha->CreateImage();

... will output:

You can validate the php captcha with:

if (empty($_SESSION['captcha']) || strtolower(trim($_REQUEST['captcha'])) != $_SESSION['captcha']) {
return "Invalid captcha";
}

 

You can see a live example here: ​​http://joserodriguez.cl/cool-php-captcha​​.

 

More examples

Background and foreground colors, dictionary words, non-dictionary random words, blur, shadows, JPEG and PNG support:

举报

相关推荐

0 条评论