Skip to content

zerolbsony/captcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

captcha

php扩展实现的验证码生成函数

shell>/usr/local/php/bin/phpize

shell>./configure --with-php-config=/usr/local/php/bin/php-config

如有问题可使用下面的:

./configure --enable-captcha-zts --with-php-config=/usr/local/php/bin/php-config

shell>make && make install shell>libtool --finish 当前目录/modules

配置php.ini

[captcha]

extension=captcha.so

下面是php代码示例:

<?php

//定义要生成的验证码个数

define('CAPTCHA_AMOUNT', 5);

//验证码词库

define('CAPTCHA_DICTPATH', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789');

echo generate_captcha();

?>

About

php扩展实现的验证码生成函数

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published