|
|
imgsecuregen() Generate an image with a random number, usefull for bot protection.
@param integer $size
@author Ben Yacoub Hatem <[email protected]>
@copyright Copyright PHP Tunisie (c) 2004
@version $Id$ - 12/06/2004 07:02:09 - securelogin.php
@access public
@return
| <?php
function imgsecuregen($size = 6){
$width = 11*$size;
$height = 30;
$string = "";
for($i = 1; $i <= $size; $i++){
$string .= rand (0,9)."";
} // for
$im = ImageCreate($width, $height);
$bg = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
$grey = imagecolorallocate($im, 170, 170, 170);
imagerectangle($im,0, 0, $width-1, $height-1, $grey);
imagestring($im, 5, $size, 5, $string, $black);
imagepng($im);
imagedestroy($im);
}
imgsecuregen(10);
?> | |
|
|
| A captcha image allows you to prevent spam posting when users reload the page and stop bots from submitting forms automatically. This version allows you to use your own fonts (.ttf) to show the text.
Categories : PHP, Security, Graphics, GD image library | | | CAPTCHA[Image verification] Categories : PHP, Security, GD image library, Graphics, Sessions | | | A damaged image generator (class) for validating text.
CAPTCHA - Completely Automated Public Turing test to tell Computers and Humans Apart Categories : PHP, PHP Classes, Security, GD image library, Security | | | Random Number generation using PHP's GD technique (captcha). Categories : PHP, GD image library, Graphics, Security | | | Image Generation Class ( PNG Format ) Categories : PHP, GD image library, PHP Classes, Graphics | | | imageMarker v 3.00 with new advanced features Categories : PHP, PHP Classes, Graphics, GD image library | | | PHP Email image generator - hide your email from bots - using the GD Library Categories : PHP, Graphics, GD image library, Beginner Guides | | | Display a bar chart based on random values. Categories : Graphics, PHP, GD image library, Charts and Graphs | | | EasyPhpThumbnail Class - The EasyPhpThumbnail class allows you to generate thumbnails and handle image manipulation for GIF, JPG and PNG on-the-fly. Categories : PHP, PHP Classes, Object Oriented, Graphics, GD image library | | | Simple PHP Bar Graph using GD library Categories : PHP, GD image library, Graphics, Arrays | | | Simple class that uses GD to draw pie charts. After the class definition there's some sample code to demonstrate how you use the class.
Categories : Graphics, PHP, PHP Classes, GD image library, Charts and Graphs | | | Dynamic Image Authentication System in Signup Pages (CAPTCHA) Categories : PHP, Security, GD image library | | | PHP Image Compression using GD library Categories : PHP, Compression, GD image library, Graphics | | | Function to generate readable/remeberable random password Categories : PHP, Security, Security | | | a simple pie-chart in php3 (with gd) Categories : PHP, Graphics, GD image library, Charts and Graphs | |
| |
| |
|