Noisy images can be a useful technique for preventing automated submissions of online forms. If you want to learn how to put this approach to work for you, this article provides you with distilled material on the topic. Welcome to the second installment of the series "Building Noisy Images." Over the course of this educational journey, you'll see how to build simple –- yet effective -- noisy images, by using a combination of basic structural markup, CSS styles and a tiny bit of PHP.
An Object-Based Approach to Building Noisy Images (Page 1 of 4 )
And speaking of creating a noisy image in a quick way, you'll recall that in the previous article, I demonstrated how to build the image by setting up a concrete example in which a sample contact form was used to test the effectiveness of this technique.
Of course, one of the biggest advantages in building noisy images by the approach I demonstrated is that it doesn't require you to use a specific server-side image library, which under certain circumstances may imply additional effort. In this case, creating a basic noisy image is a straightforward process that can be performed with only an average background on CSS and (X)HTML, and a basic knowledge on a friendly server-side scripting language, like PHP. Period.
Nevertheless, the area that surrounds the implementation of noisy images is actually huge, and in this vast terrain there's plenty of room to experiment with different approaches and technologies.
Therefore, assuming that you already learned how to build these simple noisy images by using only a bunch of CSS styles and a basic PHP function (remember that this one was utilized to generate four-digit random strings), in this second tutorial of the series I'm going to teach you how to use the same image that was created previously, this time to implement a fully object-oriented solution.
Actually, this technique can be useful if you build your own web projects using the object-based paradigm. As you know, that approach can be a real time-saver, particularly during the development of large applications. In this case, all of the tasks performed on the web server will be handled via two simple PHP classes. These tasks will include the generation of random values to be included into the corresponding noisy image, and the manipulation of session variables.
Now, having introduced the subject of this article, it's time to start learning how to build noisy images using an object-oriented approach. Let's get going!