joejophi/php-image-captcha 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

joejophi/php-image-captcha

Composer 安装命令:

composer require joejophi/php-image-captcha

包简介

Simple & Secure PHP Image Captcha

README 文档

README

Simple & Secure PHP Image Captcha

Usage/Examples

sample-form.php

<html>
  <head>
    <title>Simple Captcha</title>
  </head>
  <body>
    <center>
    <form method="post" action="formSubmit.php">
        <button type="button" onclick="document.getElementById('captchaImage').src = 'generateCaptcha.php?' + new Date().getTime();">Refresh Captcha</button>
        <br/><br/>
        <img src="generateCaptcha.php?<?php time();?>" id="captchaImage" />
        <br/><br/>
        <input type="text" id="captcha" name="captcha" />
        <br/><br/>
        <button type="submit">Submit</button>
    </form>
    </center>
  </body>
</html>

generateCaptcha.php

<?php

require_once 'vendor/autoload.php';

$captcha = new \Joejophi\PhpImageCaptcha\Captcha();
return $captcha->generate();

formSubmit.php

<?php

require_once 'vendor/autoload.php';

$captcha = new \Joejophi\PhpImageCaptcha\Captcha();

if (isset($_POST["captcha"])) {
    if ($captcha->verify($_POST["captcha"])) {
        echo "Valid Captcha";
    } else {
        echo "Invalid Valid Captcha";
    }
}

Authors

  • N M Jophi

Features

  • Easy to integrate
  • Add Simple & Secure PHP Captcha on any form within seconds
  • Image Captcha created is a combination of alphabets and numbers
  • Used to avoid spam

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固