2017 © Pedro Peláez
 

project captcha

php image captcha

image

php-captcha/captcha

php image captcha

  • Wednesday, March 22, 2017
  • by willtsang
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 20 % Grown

The README.md

phpCaptcha

php image captcha , need GD extension., (*1)

require

Predis, (*2)

install

composer.json

require: {
    "php-captcha/captcha": "~1.0"
}

example

  • use base64 string, (*3)

    use Captcha\CaptchaManager
    
    $redisClient = ...;
    $identity = ...;
    
    $captcha = new CaptchaManager($redisClient);
    
    $base64ImageString = $captcha->createBase64ImageCaptcha($identity);
    
    $response = ...;
    
    $response->setBody($base64ImageString);
    
    return $response;
  • use content-type:image/png, (*4)

    use Captcha\CaptchaManager
    
    $redisClient = ...;
    $identity = ...;
    
    $captcha = new CaptchaManager($redisClient);
    
    $captcha->createStreamImageCaptcha($identity);
    
    $response = ...;
    
    $response->headers->add([Content-type' => 'image/png']);
    
    return $response;

The Versions

22/03 2017

dev-master

9999999-dev

php image captcha

  Sources   Download

MIT

The Requires

 

by Will Tsang

22/03 2017

dev-dev

dev-dev

php image captcha

  Sources   Download

MIT

The Requires

 

by Will Tsang

22/03 2017

1.0

1.0.0.0

php image captcha

  Sources   Download

MIT

The Requires

 

by Will Tsang