cvs: pearweb /public_html captcha-image.php

From: Date: Sat, 14 Aug 2004 23:18:36 +0000
Subject: cvs: pearweb /public_html captcha-image.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-22906@lists.php.net to get a copy of this message
danielc Sat Aug 14 19:18:36 2004 EDT Modified files: /pearweb/public_html captcha-image.php Log: * Tweak comments to improve clarity. http://cvs.php.net/diff.php/pearweb/public_html/captcha-image.php?r1=1.4&r2=1.5&ty=u Index: pearweb/public_html/captcha-image.php diff -u pearweb/public_html/captcha-image.php:1.4 pearweb/public_html/captcha-image.php:1.5 --- pearweb/public_html/captcha-image.php:1.4 Sat Aug 14 19:06:05 2004 +++ pearweb/public_html/captcha-image.php Sat Aug 14 19:18:36 2004 @@ -1,7 +1,7 @@ <?php /** - * Produces a CAPTCHA image. + * Produces a CAPTCHA image * * Uses the value of <var>$_SESSION['captcha']</var> for the image's text. * That value is set in generate_captcha() in include/pear-format-html.php. @@ -22,12 +22,9 @@ * make them harder to remove. * + Some arcs will also be the background color, causing them to cut up * the foreground items. - * + Try to keep the arcs from touching the edges. + * + Encourage arcs not to touch the image's edges. * + Have the arcs run from left to right as to not look like 1 or l. - * + Make sure each arc crosses through at least some of the text. - * - * More obfuscation techniques could be used, but hey, is spamming us - * THAT big a deal? + * + Make sure each arc crosses through most of the text. * * Based on a combination of concepts found in: * + http://www.viebrock.ca/code/10/turing-protection @@ -45,7 +42,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: captcha-image.php,v 1.4 2004/08/14 23:06:05 danielc Exp $ + * @version $Id: captcha-image.php,v 1.5 2004/08/14 23:18:36 danielc Exp $ */ if (!isset($_SESSION['captcha'])) { @@ -112,6 +109,7 @@ $size = mt_rand($font_size_min, $font_size_max) * $fonts[$font_name]; switch ($char) { case 'Q': + // Keep Q's tail from being off the bottom of the image. $angle = mt_rand(0, $font_angle_max); break; default:

« previous php.pear.cvs (#22906) next »