shedokan Posted November 20, 2007 Share Posted November 20, 2007 Hello, can you tell me where can I get a captcha script or a guide that will tell me how to create a captcha script without using font files. because my server doesn't have FreeType support. thanks. Link to comment https://forums.phpfreaks.com/topic/78116-solved-where-can-i-get-captcha-script/ Share on other sites More sharing options...
revraz Posted November 20, 2007 Share Posted November 20, 2007 PHPBB uses one, could probably use the same one. Link to comment https://forums.phpfreaks.com/topic/78116-solved-where-can-i-get-captcha-script/#findComment-395312 Share on other sites More sharing options...
asmith Posted November 20, 2007 Share Posted November 20, 2007 here : one captcha simplest file , try to change the variables to see what happens, save this as a php file, and in your html use it for image source ! <? // *** CAPTCHA image generation *** // *** http://frikk.tk *** session_start(); // *** Tell the browser what kind of file is come'n at 'em! *** header("Content-Type: image/jpeg"); // *** Send a generated image to the browser *** die(create_image()); // *** Function List *** function create_image() { // *** Generate a passcode using md5 // (it will be all lowercase hex letters and numbers *** $md5 = md5(rand(0,9999)); $pass = substr($md5, 10, 5); // *** Set the session cookie so we know what the passcode is *** $_SESSION["pass"] = $pass; // *** Create the image resource *** $image = ImageCreatetruecolor(100, 50); // *** We are making two colors, white and black *** $clr_white = ImageColorAllocate($image, 255, 255, 255); $clr_black = ImageColorAllocate($image, 0, 0, 0); // *** Make the background black *** imagefill($image, 0, 0, $clr_black); // *** Set the image height and width *** imagefontheight(15); imagefontwidth(15); // *** Add the passcode in white to the image *** imagestring($image, 5, 30, 3, $pass, $clr_white); // *** Throw in some lines to trick those cheeky bots! *** imageline($image, 5, 1, 50, 20, $clr_white); imageline($image, 60, 1, 96, 20, $clr_white); // *** Return the newly created image in jpeg format *** return imagejpeg($image); // *** Just in case... *** imagedestroy($image); } ?> DO NOT FORGET TO start a session in your html form file . Link to comment https://forums.phpfreaks.com/topic/78116-solved-where-can-i-get-captcha-script/#findComment-395313 Share on other sites More sharing options...
shedokan Posted November 20, 2007 Author Share Posted November 20, 2007 I get this when I try it: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /www/110mb.com/n/e/o/s/t/a/r/_/neostar/htdocs/admin/captcha.php:1) in /www/110mb.com/n/e/o/s/t/a/r/_/neostar/htdocs/admin/captcha.php on line 5 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/110mb.com/n/e/o/s/t/a/r/_/neostar/htdocs/admin/captcha.php:1) in /www/110mb.com/n/e/o/s/t/a/r/_/neostar/htdocs/admin/captcha.php on line 5 Warning: Cannot modify header information - headers already sent by (output started at /www/110mb.com/n/e/o/s/t/a/r/_/neostar/htdocs/admin/captcha.php:1) in /www/110mb.com/n/e/o/s/t/a/r/_/neostar/htdocs/admin/captcha.php on line 8 Link to comment https://forums.phpfreaks.com/topic/78116-solved-where-can-i-get-captcha-script/#findComment-395316 Share on other sites More sharing options...
asmith Posted November 20, 2007 Share Posted November 20, 2007 i think it is a good captcha site IF you read it at the beginning : http://www.captcha.biz/ it helps you. Link to comment https://forums.phpfreaks.com/topic/78116-solved-where-can-i-get-captcha-script/#findComment-395319 Share on other sites More sharing options...
tiki Posted November 20, 2007 Share Posted November 20, 2007 www.recaptcha.net Link to comment https://forums.phpfreaks.com/topic/78116-solved-where-can-i-get-captcha-script/#findComment-395328 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.