Download the PHP package thytanium/captcha without Composer
On this page you can find all versions of the php package thytanium/captcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package captcha
Captcha for Laravel
Install
Edit your composer.json
file
Laravel 4
Laravel 5
Run composer update
to install the package.
Then add the following to app.php
Then, you have to publish the configuration file.
Use
To use it just put this HTML code in your form next to a text input.
Validate
To validate the entered text into the input, put this in your validation rules:
Options
You can edit config/captcha.php
configuration file to change behavior of captcha.
String length
By default, string length is 6 characters. You can change it to whatever length you want. Remember, you might have to change width also, is not auto-calculated.
Width and height
By defaut, width and height are 200px
x 50px
.
You can change it to any other size.
Case sensitive
By default case verification is enabled.
Change it to false
to disable it.
Letters case
If you want the captcha to show only upper letters, lower letters or mixed.
Show letters/numbers
If you want a captcha with letters only:
If you want a captcha with numbers only:
If you want a captcha with both letters and numbers:
Character angle
By default, character angle is 15. This will generate an captcha with characters angle between 0 and 15 degrees. Change it to whatever you want. If you want the characters in "straight" way, just put this value to 0 (zero).
Separation
This is separation between characters. Default is 30. The higher the more separated.
Background grid
By default, background shows 20 vertical lines and 5 horizontal lines (one every 10 pixels). You can show as many lines as you want.
Colors
Colors must be provided in RGB notation [rrr,ggg,bbb].
Background color
By default is 250,250,250 (almost white)
Line color
By default is 220,220,220 (very light gray)
Font colors
This is an array
of choices. You can add as many colors as you want and the characters will rendered is this colors randomly.
Font
This package works with TrueType (.ttf) fonts.
Four font choices are already provided: Prototype
(default), Impact
, BrianJames
and Spinwerad
. All of them thanks to 1001freefonts.
Prototype
Impact
BrianJames
Spinwerad
Font size
By default, font size is 30px
. Change it to whatever you want.
Image quality
By default, and I recommend to keep it that way, image quality is 100.