承接 woogoo/captcha 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

woogoo/captcha

最新稳定版本:1.0.1

Composer 安装命令:

composer require woogoo/captcha

包简介

A simple graphic captcha generator

README 文档

README

A simple graphic captcha generator driven by the GD extension

Quick start:

<?php

use WooGoo\Captcha;

$font = './captcha-font.ttf';

$captcha = new Captcha($font); // initialization, with a fully qualified TrueType font file

$captcha_string = $captcha->getCaptcha(); // retrieve your captcha string

$captcha_image = $captcha->getGraphicCaptcha(100, 40, 'png'); // define min-width and min-height of output image

header('Content-type: image/png');

echo $captcha_image; // output captcha image to browser

Initialization options (via "__construct" method)

  • $font: the fully qualified TrueType font
  • $length: the length of captcha string that you need
  • $fontSize: the font size (in pt)
  • $characterMargin: the space in pixel that between two character neighbours
  • $characterAngleMin: the minimum available angle for each character
  • $characterAngleMax: the maximum available angle for each character
  • $interference: grade of interference for output image (none, low, medium, high)

Works with Bootstrap

<div class="input-group">
    <input type="text" name="captcha" class="form-control" id="inputCaptcha" placeholder="Captcha" aria-describedby="form-captcha-addon">
    <span class="input-group-addon" id="form-captcha-addon">
        <img id="imgCaptcha" src="/PATH-TO-YOUR/CAPTCHA-RENDER" alt="captcha" title="Refresh captcha on click" />
    </span>
</div>

统计信息

  • 总下载量: 139
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-17