Download the PHP package phpu/think-captcha without Composer

On this page you can find all versions of the php package phpu/think-captcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package think-captcha

thinkcaptcha

thinkphp6图片验证码

https://liujiawm.github.io/

安装

php版本要求 >=7.1.0

composer

如果项目未开启SESSION,则需要开启,开启方式参考thinkphp6完全开发手册中杂项之SESSION

require

注意:验证码不支持多字节字符

使用方法

控制器文件use phpu\facade\ThinkCaptcha;

输出验证码图片

验证码显示控制器

验证

验证码验证控制器

更多说明

如果创建验证码时使用独立的key

ThinkCaptcha::printImg('test') // 'test'是识别key,限数字和字母

那么验证时也需要传入同名key

ThinkCaptcha::check($code,'test') // 'test'是识别key,限数字和字母

默认验证完后不论成功还是错误都会删除验证码数据,如果验证完后不删除

ThinkCaptcha::check($code,'test',0) // 0表示不删除

或者,只有在验证成功后才删除

ThinkCaptcha::check($code,'test',1) // 1表示验证成功后才删除

当然,验证时也可以设置验证码过期时间,默认1800秒(30分钟内有效)

ThinkCaptcha::check($code,'test',2,3600) // 1小时内有效

独立配置

配置文件中提供独立配置,

如果无效果建议将配置文件config.php改名为phpu_captcha.php移入项目配置目录内!

使用configure()配置,参数是配置文件一级数组的索引,默认为default

例:

配置文件


All versions of think-captcha with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
ext-mbstring Version *
ext-gd Version *
topthink/framework Version ^6.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phpu/think-captcha contains the following files

Loading the files please wait ....