Download the PHP package phgors/gocaptcha without Composer

On this page you can find all versions of the php package phgors/gocaptcha. 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 gocaptcha

phgors/gocaptcha

PHP 行为验证码库(点选 / 滑动 / 旋转),go-captcha 生态的 PHP 后端实现。 基于 GD,开箱即用,纯无状态,框架无关,内置默认字体 / 背景 / 拼图素材。

📖 完整文档:docs/usage.md(环境要求 / 快速开始 / 三种验证码详解 / 配置参考 / 素材规范 / 前端对接 / 框架集成 / FAQ / API 速查)

特性

安装

要求:PHP >= 7.4,ext-gd(建议启用 FreeType 以支持中文字符渲染)。

点选验证码

图形点选模式使用 buildShape(),并通过 setShapes() 传入图形映射。

滑动验证码

旋转验证码

配置

每种验证码通过 with*() 方法构造不可变的 Options 对象,再用 setOptions() 注入 Builder。 下面给出常用项,完整选项见 src/ 下各 *Options.php 的默认值。

SlideOptions 提供 withImageSize、withRangeGraphSize、withGraphNumber、 withEnableGraphVerticalRandom;RotateOptions 提供 withImageSquareSize、 withThumbSquareSize、withRangeAngle、withThumbAlpha。

自定义素材

有两种方式:

  1. 替换默认目录中的文件:把素材放入 resources/fonts(.ttf / .otf 自动加载)、 resources/backgrounds(.jpg)、resources/tiles/<set>/(overlay.png / mask.png / shadow.png), DefaultAssets 会自动发现。

  2. 传入绝对路径:直接把素材路径数组传入对应 Builder 的 setter, 或构造自定义 AssetLoader 指向自己的资源目录。

协议

依据 OFL 条款,字体的版权声明与许可证全文随字体一同再分发。


All versions of gocaptcha with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-gd Version *
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 phgors/gocaptcha contains the following files

Loading the files please wait ...