class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
How do you make it possible to generate another image when clicked on captcha? The original class does not do that. It is probably ajax, can you give some code?Reply
Basically, the source of the image is a PHP script which generates and output the CAPTCHA image (and also set the CAPTCHA phrase into the session). I add a random value to the URL to make sure that the CAPTCHA is generated each time and is not taken from the cache.
See: Replace ### by javascript in the code above.
The file captcha.php is very simple:
session_start();
$captcha = new CaptchaNumbersV2(5);
$captcha->display();
$_SESSION['captcha'] = $captcha->getString();
exit();
Basically, the source of the image is a PHP script which generates and output the CAPTCHA image (and also set the CAPTCHA phrase into the session). I add a random value to the URL to make sure that the CAPTCHA is generated each time and is not taken from the cache.
See:
Replace ### by javascript in the code above.
The file captcha.php is very simple: