Skip to content

Commit

Permalink
Merge branch 'release' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hemroy21 committed Apr 30, 2021
2 parents 0200e5f + f514389 commit 2ec2264
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 2,121 deletions.
29 changes: 23 additions & 6 deletions ReadMe.MD
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,34 @@ PHP based simple captcha package for quick implementation in php based web applc

Installation
Composer Installation:
______________________________________


composer require hemroy/simplecaptcha


``````````````````````````````````````
Usage
This package is very easy to use.
A simple example has been given inside test folder.
Two simple examples has been given inside test folder.

>> This library provides unique class Captcha, which provides some functions
to build and generate captcha to use on webpage. Functions which can be used
and available to use are discussed below.

+ Captcha class : This is the main class which is need to be called to use the library.
create an Captcha class instant as, $captcha=new Captcha();

+ generate() : this method will generate a captcha using methods available through
backgroundGenerator and stringGenerator class and pass the captcha to
the calling class.

+ getJpegCaptcha() : This method will provide the jpeg image of the captcha to
use directly onto a webpage.

+ getPngCaptcha() : This method will provide the Png image of the captcha to
use directly onto a webpage.
+ getRandomString(): the method will provide the captcha string to use or
store into session variable/
+ getImageData(): the method that will provide base64 encoded datastream of the image.

>>To know the Usage perfectly, go through the test folder.
license

Expand Down
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
"ext-gd": "*",
"ext-mbstring": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
},

"autoload": {
"psr-4": {
"src\\": "simple_captcha/src"
Expand Down
Loading

0 comments on commit 2ec2264

Please sign in to comment.