Wednesday, November 21, 2007
Prevent robot spams using CAPTCHA IMAGE
I heard lot of complaints related to the relaxed registration rules of PHPMotion compared to Vbullettin and PHPBB etc.
I myself ran into a serious robot spamming on my website CONTACT page.
Here is a free, elegant solution I found from http://captchas.net
Here is how it works.
1) Register at http://captchas.net/ and get a userid and secret key for yourself.
2) Download the following 3 files from http://captchas.net/ for PHP solution.
They have solutions for ASP, Perl, Python and JSP also.
2.1) query.php (The code you want to put in the page you want to protect against robot spam)
2.2) check.php (The code you want to put in the page you process the data submitted by the form)
2.3) CaptchasDotNet.php (you don't need to change this).
3) Use the userid and key to customize the following invocation (files 1 and 2):
$captchas = new CaptchasDotNet ('userid','secret_key',
'file_loc','3600',
'abcdefghkmnopqrstuvwxyz','6',
'240','80');
file_loc is a path to a directory on your server with write access.
See the code in action on my site
We can use the same to protect the registration page of PHPM as well.
Hope this helps!
I myself ran into a serious robot spamming on my website CONTACT page.
Here is a free, elegant solution I found from http://captchas.net
Here is how it works.
1) Register at http://captchas.net/ and get a userid and secret key for yourself.
2) Download the following 3 files from http://captchas.net/ for PHP solution.
They have solutions for ASP, Perl, Python and JSP also.
2.1) query.php (The code you want to put in the page you want to protect against robot spam)
2.2) check.php (The code you want to put in the page you process the data submitted by the form)
2.3) CaptchasDotNet.php (you don't need to change this).
3) Use the userid and key to customize the following invocation (files 1 and 2):
$captchas = new CaptchasDotNet ('userid','secret_key',
'file_loc','3600',
'abcdefghkmnopqrstuvwxyz','6',
'240','80');
file_loc is a path to a directory on your server with write access.
See the code in action on my site
We can use the same to protect the registration page of PHPM as well.
Hope this helps!
Subscribe to Posts [Atom]