note 90673 added to book.mail
| From: | rajeshrajesh dot 35 at gmail dot com | Date: | Mon, 04 May 2009 10:22:22 +0000 |
| Subject: | note 90673 added to book.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154174@lists.php.net to get a copy of this message | ||
<?php
session_start();
function generateCode($characters) {
// list all possible characters, similar looking characters and vowels have been removed
$possible = '23456789abdfghjkmnpqrstvwxyzABDEFGHJLMNPQRST';
$code = '';
$i = 0;
while ($i < $characters) {
$code .= substr($possible, mt_rand(0, strlen($possible)-5), 1);
$i++;
}
return $code;
}
$im = @imagecreatefromjpeg("image/captcha.jpg");
$rand = generateCode(4);
$_SESSION['captcha'] = $rand;
$text_color = imagecolorallocate($im, 205, 250, 205);
imageline ($im,$x1,$y1,$x2,$y2,$text_color);
imagestring($im, 5, 2, 2," ".$rand, $text_color);
header ('Content-type: image/jpeg');
imagejpeg($im,NULL,100);
imagedestroy($im);
?>
----
Server IP: 59.162.86.8
Probable Submitter: 59.178.133.167
----
Manual Page -- http://www.php.net/manual/en/book.mail.php
Edit -- https://master.php.net/note/edit/90673
Del: integrated -- https://master.php.net/note/delete/90673/integrated
Del: useless -- https://master.php.net/note/delete/90673/useless
Del: bad code -- https://master.php.net/note/delete/90673/bad+code
Del: spam -- https://master.php.net/note/delete/90673/spam
Del: non-english -- https://master.php.net/note/delete/90673/non-english
Del: in docs -- https://master.php.net/note/delete/90673/in+docs
Del: other reasons-- https://master.php.net/note/delete/90673
Reject -- https://master.php.net/note/reject/90673
Search -- https://master.php.net/manage/user-notes.php