Recommend this page to a friend! |
Download .zip |
Info | View files (4) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2010-09-05 (6 years ago) | Not enough user ratings | Total: 423 | All time: 6,050 This week: 1,069 |
Version | License | PHP version | Categories | |||
customizable-captcha 1.0 | GNU General Publi... | 5.0 | PHP 5, Graphics, Validation, Security |
Description | Author | |
This class can be used to Generate and validate CAPTCHA images. |
A fully-customizable captcha class. Captcha is used to stop automated form submission. This class can be used to generate custom captcha image for your website. It also provides method to validate the captcha. How to use ---------- Start session Instantiate Captcha class Set captcha properties( background, text color, font etc.) using setXXX methods provided by the captcha object (optional). Display image using showImage() method Requirements: PHP5 GD libraray ( freetype library support needed) method summary -------------- function showImage() Generates captcha image. Outputs generated image in png format. function setBGColor( $r, $g, $b ) Sets the background color of captcha image. Parameters: $r -> Red, $g -> green, $b -> blue. [ RGB format ] function setFontSize( $size ) Sets the font size. Parameter: $size -> The font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2). function setSize( $width, $height ) Sets the captcha images size. Parameters : $width -> image width, $height -> image height. function setFont( $font ) Sets the font of captcha. Parameter: $font -> path to TrueType font file. function setTextColor( $r, $g, $b ) Sets the captcha text color. Parameters: $r -> Red, $g -> green, $b -> blue. [ RGB format ] public static function isValid( $code ) Validates captcha. if valid returns true, otherwise false. Parameter: $code -> user input to be validated |
Files |
File | Role | Description |
---|---|---|
class.captcha.php | Class | captcha class |
form.php | Example | captcha demo page |
getcaptcha.php | Example | captcha loader - generates captcha image for form.php |
readme | Doc. | readme |
customizable-captcha-2010-09-05.zip 3KB | |
customizable-captcha-2010-09-05.tar.gz 2KB | |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Comments (1) | |||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.