473,769 Members | 1,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 22502
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...@RedBric k.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************ *****@btinterne t.compíše v diskusním
příspěvku news:ei******** ***********@new s.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
2793
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, Can any one suggest me how to continue my work or give their valuable suggestions for capturing text in the CAPTCHA image . yours KrishnaKumar
12
3387
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 important. Any recommendations, or experience with a specific one to share? I get a lot of SPAM entries on a guestbook, and want to protect it. I'll require users to solve a CAPTCHA before their entry is accepted. I might use CAPTCHAs to protect...
12
10238
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 the same six color names differently, but each such css file assigns red to one and only one of those same six color names, and then store the six somewhere in the document_root.
7
10163
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 get any results. i have used Simple AJAX Code-Kit (SACK) (http://www.twilightuniverse.com/)
4
5794
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 access that code in session from my c# windows application. I have a form in my application for registering users. The application then calls to the webserver and uses regular .php page to submit user registration. It has captcha and thats why I need...
11
2437
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 with this method? TIA, Twayne
4
2178
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 do (this was a long time ago too), and at some point I recall editing it in a Hex editor before finally getting it to work, basically I do not have a clue what this thing needs to do to work. One day I tried my registration form (without editing...
7
1490
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. aspx code, etc... ?? I could not find any..
15
4805
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. Imagine a case when someone gets to a form with CAPTCHA, a session will be started in the server; and then the person decides to jump to another site without filling the form. The session data still exists in the server. If this scenario gets repeated...
10
7856
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 >Verification Image:</span> <span ><img src="captcha.php" id="captcha" /> <a href="#renew" onclick="javascript: document.getElementById('captcha').src = 'captcha.php?' + Math.random();">refresh</a> </span>
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7408
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.