IT Community - Software Programming, Web Development and Technical Support

what is CAPTCHA?

This is a discussion on what is CAPTCHA? within the PHP Programming forums, part of the Web Development category; Hi friends, Can any one explain what is CAPTCHA? Thanks devarajan.V...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > PHP Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-25-2007, 09:30 AM
devarajan.v devarajan.v is offline
D-Web Master
 
Join Date: May 2007
Posts: 382
devarajan.v is on a distinguished road
Question what is CAPTCHA?

Hi friends,

Can any one explain what is CAPTCHA?

Thanks
devarajan.V
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-27-2007, 05:00 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: what is CAPTCHA?

A CAPTCHA is a type of challenge-response test used in computing to determine whether the user is human. "CAPTCHA" is an acronym for "Completely Automated Public Turing test to tell Computers and Humans Apart", trademarked by Carnegie Mellon University. A CAPTCHA involves one computer (a server) which asks a user to complete a test. While the computer is able to generate and grade the test, it is not able to solve the test on its own. Because computers are unable to solve the CAPTCHA, any user entering a correct solution is presumed to be human. The term CAPTCHA was coined in 2000 by Luis von Ahn, Manuel Blum, Nicholas J. Hopper (all of Carnegie Mellon University), and John Langford (of IBM). A common type of CAPTCHA requires that the user type the letters of a distorted image, sometimes with the addition of an obscured sequence of letters or digits that appears on the screen. Because the test is administered by a computer, in contrast to the standard Turing test that is administered by a human, a CAPTCHA is sometimes described as a reverse Turing test.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-27-2007, 06:26 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: what is CAPTCHA?

CAPTCHA
you are likely to have already seen them across the web. They are those little images with a code on the front that you type into a box in order to submit something. This kind of system helps to prevent automatic submitting of an operation by some kind of program or robot.

Its not the most advanced captcha available because it uses a simple system font and nothing more.



The lines that you see in the image are to make any robots job of trying to work out that code a little harder. The dots in the background also help with this.

To put it simply a captcha works by generating a random string, writing it to an image, then storing the string inside of a session or cookie or by some other method. This is then checked when the form or operation is performed. Below is a step by step layout of how it works.
1. Random text generated
2. Text written to image
3. Text stored in session/cookie/database
4. Image displayed to user
5. User enters the code
6. User entered code is checked against the stored key
7. If they match then continue..

for eg:
<?
// randomly generated string to be on the image.
$string = "xxxxxxxx";

$captcha = imagecreatefrompng("./captcha.png");

/*
Lets set the colours, the colour $line is used to generate lines.
Using a blue misty colours. The colour codes are in RGB
*/

$black = imagecolorallocate($captcha, 0, 0, 0);
$line = imagecolorallocate($captcha,233,239,239);

/*
Now to make it a little bit harder for any bots to break,
assuming they can break it so far. Lets add some lines
in (static lines) to attempt to make the bots life a little harder
*/
imageline($captcha,0,0,39,29,$line);
imageline($captcha,40,0,64,29,$line);

/*
Now for the all important writing of the randomly generated string to the image.
*/
imagestring($captcha, 5, 20, 10, $string, $black);


/*
Encrypt and store the key inside of a session
*/

$_SESSION['key'] = md5($string);

/*
Output the image
*/
header("Content-type: image/png");
imagepng($captcha);
?>
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Info on Captcha Jeyaseelansarc PHP Programming 1 07-06-2007 05:53 AM
CAPTCHA- Security tool vadivelanvaidyanathan Testing Tools 0 03-19-2007 07:11 AM


All times are GMT -7. The time now is 03:16 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0