We must connect to a db for this to work
- create a database
- import objectcaptcha.sql in it
- set your credentials in db.php
ObjectCaptcha works in two steps
- First (in index.php) an image is grabbed, the answer saved to the db, then the registration form displayed.
- Second (in register.php) the answer from the db is compared to the input from the form.
Some notes on ObjectCaptcha
- A random jpg image will be displayed each time (and its answer saved to the db).
- The answer to an image is the image's filename.
- Multiple answers can be given for an image. They have to be separated with underscores in the image's filename. For example, for: boot_shoe.jpg the answer can be either 'boot' or 'shoe'
- ObjectCaptcha needs a db to temporarily store answers, because it would be unsafe to store them in cookies.
- Images are encoded in base64 format and displayed like that, so their original filename cannot be retrieved.
- Random garbage is added to the end of an image (JPEG allows this) to protect against hash attacks on the image.
- I originally created ObjectCaptcha as a mod for SMF forum. This is a more generic relase that can be used with other systems.
- The img folder has a .htaccess with Deny from All
These are example files, not needed on a production site:
objectcaptcha.sql is needed only for installation.