Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Captcha Code in php

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 3
    • 0
    • 277
    Comment on it

    Captcha stands for “ Completely Automated Public Turing test to tell Computers and Humans Apart”. A captcha is a small program which is used to develop a software program that can create and grade challenges most humans can pass but not by computers. In simple words, it is a program used to determine whether its user is a human or a computer.

     

     

    Applications where it is useful:

    1. Free email services.
    2. Online polls
    3. Dictionary attacks
    4. Newsgroups, Blogs, etc...
    5. Spam

     

     

    Text based Captcha:

    • Gimpy – In this type of captcha, pick a word or words from a small dictionary. Distort them and add noise and background.
    • Google's captcha – In this type, pick random letters. Distort them, add noise and backgrounds.

                           

     

    Graphic based Captcha:

    • Bongo – In this type, two series of blocks is displayed. User must be able to find the characteristics that sets the two series apart. User is asked to determine which series each of four single blocks belongs to.

                              

     

    /*Simple captcha program */

     

    <?php
    	$varA=range("0","9");
    	$varB=range("A","J");
    	$varC=range("K","Z");
    	$varD=range("a","j");
    	$varE=range("k","z");
    	
    	$varArnd = array_rand($varA);
    	$varBrnd = array_rand($varB);
    	$varCrnd = array_rand($varC);
    	$varDrnd = array_rand($varD);
    	$varErnd = array_rand($varE);
    	
    	
    	$prnt="<font color='red'>".$varA[$varArnd]."</font>"."<font color='green'>".$varB[$varBrnd]."</font>".$varC[$varCrnd].$varD[$varDrnd].$varE[$varErnd];
    	
    ?>
    <html>
    	<head>
    		
    	</head>
    	<body style="padding:80px;background-color:#999;">
    		<table align="center" border="1" >
    			<tr>
    				<td colspan="2" align="center" style="padding:10px">
    				<?php echo "<font size='20'>".$prnt."</font>";?>
    				</td>
    			</tr>		
    		</table>
    	</body>
    </html>
    

     

    Captcha Code in php

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: