topical media & game development
professional-sql-02-public-files-img-captcha.php / php
<?php
include '../../lib/functions.php';
// must start or continue session and save captcha string in
// to be available to other requests
session_start();
// create a 65x20 pixel image
image = imagecreate(65, 20);
// fill the image background color
image, 51, 102, 255);
imagefilledrectangle(bg_color);
// fetch random text
font = 5;
image) / 2 - strlen(font) / 2;
image) / 2 - imagefontheight(fg_color = imagecolorallocate(image, x, text, _SESSION['captcha'] = image);
imagedestroy(
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.