| This JavaScript will help you to protect your page with a so-called security number feature (turning, validation).
It use a combination of JavaScript and Macromedia Flash technology. Protect
yourself against spam robots on your web page using this JavaScript!
Number Protection
Random 6-digit number generated and stored in cookie with defined name and then
displayed by Flash clip for user, so later you can just verify cookie value with user input
(you should provide a form for user to type in number) and this will help you to protect your
submission pages from robots and/or login areas from dictionary hacking.
Number displaying
Three colors provided for number area - background color, text color and color of the line which
goes up and down across the number. You can specify dimensions of number area as well (width and height).
Server-side processing
All commonly used scripting languages can process cookies easily,
so you can make just a small addition to existing processing script to check user input:
with Perl you can retrieve cookies by using CGI::Cookie module.
Example:
# fetch existing cookies
use CGI qw/:standard/;
use CGI::Cookie;
%cookies = fetch CGI::Cookie;
$check = $cookies{'cookie_name'}->value;
With PHP checking cookies even easier: $check=$_COOKIE['cookie_name'];
Of course cookie_name should be replaced to cookie name specified by you for the applet.
Then just compare retrieved cookie value with field which were used in your form for typing-in
check number (check that its not empty as well).
Limited Compatibility
Note that this effect has limited compatibility! The effect
works on the following browsers:
Internet Explorer 4
Internet Explorer 5
Internet Explorer 5.5 (or later)
Opera 5 (or later)
Netscape 6 (or later)
Other settings
There are other settings that are discussed on the following
topics from the Anfy Flash documentation:
Working With Text Fields
JavaScript Effect
Compatibility
Aleksey Udovydchenko
|