Recommend this page to a friend! |
Download .zip |
Info | View files (3) | Download .zip | Reputation | Support forum (2) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2008-05-10 (8 years ago) | Not enough user ratings | Total: 416 | All time: 6,097 This week: 1,069 |
Version | License | PHP version | Categories | |||
class_captcha_df 1.0 | GNU General Publi... | 5.0 | PHP 5, Graphics, Validation, Security |
Description | Author | |||||||||||||
This class can be used to generate images for CAPTCHA validation. |
|
################################################# # # # class DF_Captcha for one simple captcha # # # # License : GPL # # # ################################################# This is a class for a one captcha! You can tell me: "Oneother captcha script?" I saw you: "This is more simple!" NB: this class 4 work need sans.ttf; if you hate it, you can change with what you want. But remenber you must change the param text_font; This class give you a simple captcha, without the need to save the image on your server! You can have a captcha in only 3 instruction: 1: $c = new DF_Captcha(372, 60, "fff"); #define a new instancies of class => you can define a new class without arg #es: new DF_Captcha(); => there is default arg 2: $c->drawImage(); #draw your image => you have your captcha ready 3: $code = $c->getCode(); #there is your code for verification Just simple! What do you want yet? What? You want to set the length of the code? You can do it! $c->setLenCode(7); #replace 7 with the number you want to set your length code You can modify this parameters of your choise You must do only this: $c->format = $param; #format of the image; are supported only png or jpeg because use of this captcha is prevalently 4 the web public $format = "png"; #distortion image with square - this is because so bot are more difficult see the image and the letter over the image public $noise_square = 1; #distortion image with little line - this is because so bot are more difficult see the image and the letter over the image public $noise_granular = 1; #font with text is writed - for change this you must put ttf in dir with the class public $text_font = "sans.ttf"; #this is not modifible public $text_font_size; #0 text color black - 1(default) text color random public $text_color_mode = 1; #1 fix dimension - 0.7 dimension between 70&100% ... public $text_size_mode = 0.8; #0 no rotation - 10 rotation between -10°&+10° - 20 -20°&+20° ... public $text_rotation_mode = 10; That's all! If the class is OK 4 you, please vote it on phpclasses.org! |
Files |
File | Role | Description |
---|---|---|
class.captcha.php | Class | DF_Captcha Class |
example.php | Example | Example |
readme.txt | Doc. | Readme - how use this class |
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.