Columbus, Ohio

PHP Form image verification

If you are getting a lot of spam in your contact forms, check out the following image form verification.

This is most likely the best image verification example that I have come across. There is one problem though, it is not vision accessible. So what I suggest, next to this image add a link ‘vision impaired users click here’ and open a new window that looks something like the following.

[PHP]
function AddSpaces($str) {
return $str[0].’ ‘.$str[1].’ ‘.$str[2].’ ‘.$str[3].’ ‘.$str[4];
}
session_start();
[/PHP]
… HTML …
Verification code: [PHP] echo AddSpaces($_SESSION[‘image_value’]); [/PHP]
… HTML …
Hopefully this will come in handy for you as it has for me.

Join My FREE Newsletter

Get the latest news and episodes of the Cloud Entrepreneur Podcast and Angelo’s development blog directly in your inbox!