项目作者: danielgasser

项目描述 :
Creates an image with a randomly created simple arithmetic operation as Captcha.
高级语言: PHP
项目地址: git://github.com/danielgasser/toesslab-CaptCha.git
创建时间: 2018-01-19T21:17:08Z
项目社区:https://github.com/danielgasser/toesslab-CaptCha

开源协议:

下载


toesslab - CaptCha

Creates an image with a randomly created simple arithmetic operation as Captcha.

Requires PHP version 7.x

Possible options:

  • int $maxLow: The lowest randomly possible number
  • int $maxHigh: The lowest randomly possible number
  • array $availableOperators: Addition, Subtraction, Multiplication & Division are supported
  • string $fontFile: Absolute path to a .ttf font file

Usage:

  1. $captcha = new \CaptchaCalc\CaptchaCalc(3, 15, ['+', '-', '*', '/'], 'absolute/path/to/fontfile.ttf');
  2. $img = $captcha->generateImage();
  3. echo '<img src="$img">';
  4. // Result (Don't show in production environment):
  5. $captcha->calculateResult();