473,372 Members | 1,040 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Captcha's

Hello

One web site I have written has a 'register your interest' form which simply
e-mails the data, this is working fine except some people seem to get off on
repeatedly using the form to send phoney data. I guess this is from some
kind of web-bot so I would like to attempt to program around this problem.

One solution is using a distorted image of some letters (CAPTCHA?), however
I was wondering if anybody has chosen a simpler method, and whether my
simple method would be impervious to web-bots?

1/ Generate a random string of letters
2/ Ask the user to select from 3 combo boxes 3 random positions, e.g. select
letters 2, 6 and 7 from LKJIUVBJH.

TIA

Barry Morris

Nov 3 '06 #1
5 22479
Tom
I was looking for a captcha class recently myself. phpclasses.org has
several. hn_captcha was my favorite:

http://www.phpclasses.org/browse/package/1569.html
On Nov 3, 8:52 am, David Gillen <Bel...@RedBrick.DCU.IEwrote:
An noise sounding like Barry Morris said:One web site I have written has a 'register your interest' form which simply
e-mails the data, this is working fine except some people seem to get off on
repeatedly using the form to send phoney data. I guess this is from some
kind of web-bot so I would like to attempt to program around this problem.
One solution is using a distorted image of some letters (CAPTCHA?), however
I was wondering if anybody has chosen a simpler method, and whether my
simple method would be impervious to web-bots?
1/ Generate a random string of letters
2/ Ask the user to select from 3 combo boxes 3 random positions, e.g. select
letters 2, 6 and 7 from LKJIUVBJH.Easy to program around, but unless someone actively wants to circumvent it
probably will do the trick.

There are however plenty of easy to plug in captcha libraries out there.
Google is your friend here.

D.
--
/(bb|[^b]{2})/
Trees with square roots don't have very natural logs.
What's the difference between ignorance and apathy? Who knows? Who cares?
Nov 3 '06 #2
"Barry Morris" <no*****************@btinternet.compíše v diskusním
příspěvku news:ei*******************@news.demon.co.uk...
Hello

One web site I have written has a 'register your interest' form which
simply e-mails the data, this is working fine except some people seem to
get off on repeatedly using the form to send phoney data. I guess this is
from some kind of web-bot so I would like to attempt to program around
this problem.

One solution is using a distorted image of some letters (CAPTCHA?),
however I was wondering if anybody has chosen a simpler method, and
whether my simple method would be impervious to web-bots?
CAPTCHA is good if the picture is not too distorted :-)
But you need not use CAPTCHA. I have easier way.

You generate two keys and place in <form>

<?php
$n1 = chr(rand(65, 90));
$n2 = chr(rand(65, 90));
$n3 = chr(rand(65, 90));
$n4 = chr(rand(65, 90));
$n5 = chr(rand(65, 90));
$key1 = $n1 . $n5 . $n3 . $n2 . $n4; # the sequence know YOU only
$key2 = $n4 . $n1 . $n2 . $n5 . $n3; # the sequence know YOU only
echo "<input type='hidden' name='key1' value='$key1'>",
"<input type='hidden' name='key1' value='$key2'>";
?>

After submit you do some check like this

<?php
$key1 = $_POST["key1"];
$key2 = $_POST["key2"];
$k1 = substr($key1,0,1) . substr($key1,3,1) . substr($key1,2,1) .
substr($key1,4,1) . substr($key1,2,1);
$k2 = substr($key2,1,1) . substr($key2,2,1) . substr($key2,4,1) .
substr($key2,0,1) . substr($key2,3,1);
if($k1 ne $k2) {
echo "I don't like robots";
}
?>

This is example only. You can to generate keys containing 50 chars and time
to time you can make changes in PHP code :-)

--

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)

Nov 4 '06 #3
Hello,

on 11/03/2006 07:49 PM Barry Morris said the following:
Hello

One web site I have written has a 'register your interest' form which simply
e-mails the data, this is working fine except some people seem to get off on
repeatedly using the form to send phoney data. I guess this is from some
kind of web-bot so I would like to attempt to program around this problem.

One solution is using a distorted image of some letters (CAPTCHA?), however
I was wondering if anybody has chosen a simpler method, and whether my
simple method would be impervious to web-bots?

1/ Generate a random string of letters
2/ Ask the user to select from 3 combo boxes 3 random positions, e.g. select
letters 2, 6 and 7 from LKJIUVBJH.
Most Web bots hackers would not bother to defeat simple CAPTCHAs unless
the benefits of defeating it as very high.

If you want to have CAPTCHA validation integrated in forms with other
fields that have their own types of validation, you may want to try this
forms generation and validation class that comes with a plug-in to
implement a CAPTCHA control with almost no effort:

http://www.phpclasses.org/formsgeneration

--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Nov 4 '06 #4
Thank you all for the advice, I will look at various and recommended
Captcha's for a solution.

Regards

Barry
Nov 4 '06 #5
I've written an accessible, multiple choice question based captcha,
it's available at
http://system-x.info/?pageid=18&menutree=47

Nov 5 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Krishna Kumar | last post by:
Hai all, I am doing a project in .net and in that project I have a problem in capturing text from an image. i.e images like CAPTCHA images . which has inbuilt text with in the image.So,...
12
by: Francois Bonzon | last post by:
After a Google search, I see that quite a few CAPTCHA implementations in PHP are available. I'd like one that's not (easily) OCR-able, or otherwise crackable. Open source or commercial is not...
12
by: pittendrigh | last post by:
Let's say we're trying to keep blog and forum spammers out of our site--we're not trying to protect fort knox. 1) Step one is a one-time-only step. We create six different css files that define...
7
by: mitchell | last post by:
hi i m using IE 6.0. i want to refresh just the captcha part when the user clicks on an image. i searched for articles on it and got a fairly good understanding of it. but i m still unable to...
4
by: xeiter | last post by:
Hi, I have a captcha script on my website located at /captcha.php. What it does it generates an image with the code, displays the image (gd2) and saves the value of the code in session. How do I...
11
by: Twayne | last post by:
Hi, Learning PHP code; playing with various methods of generating captcha codes: In the code below, how would I change the size of the text displayed in the captcha code? Is it even possible...
4
by: Jeigh | last post by:
My host has been 'upgrading' lately and its caused me a whole mess of problems. The last of which being that my CAPTCHA form no longer works. I remember to get the CAPTCHA working it took me weeks to...
7
by: =?Utf-8?B?bWF0dCBw?= | last post by:
Steve Orr has a neat Captcha control: http://steveorr.net/articles/CAPTCHASP.aspx but aside from "dragging the control onto your toolbox.." Does anyone have any installation instructions: e.g....
15
by: sb5309 | last post by:
When one uses CAPTCHA (form with verification code), a session is required to keep the session data. In examples that I have seen on the net, I did not see a session is closed after use. ...
10
by: jeddiki | last post by:
Hi, I have a captcha script which should pick up a background image and add some random letters to it and re-display This is the part of the form that the captcha image is part of: <span...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.