Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    25
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Captcha on register page

    Dear all,

    I am implementing Captcha security check on the register page and seem that I am unable to find the Captcha image/picture. Does anyone know where can i download such images?

    CAD

    PS: I am currently doing a project on security of the site and i hope that all the threads started by me will benefit people in this forum.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Does anyone know where can i download such images?
    Did you mean the background images? If not, you need to automatically generate such images with some server side code like php and then display in your html document. You will get many sample codes (including the background images) by googling php+captcha
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    May 2009
    Posts
    25
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Dear all,

    I am doing a Captcha validation before I implement into my main site but I can facing problems in getting the captcha image display everytime the page is loaded.

    Also, i am wondering do i get my validation and the random image generation corrected done?

    Any advises will be greatly appreciated.

    Sincere Thanks in advance
    CAD

    Code:
    <html>
    <head>
    <title>Captcha Login</title>
    
    <script type="text/javascript">
    var catchaImage = ["Captcha/captcha1.jpg", "Captcha/captcha2.jpg", "Captcha/captcha3.jpg"];
    
    		function validateCaptcha()
    		{
    	    clearLastErrorMsg();
    
    	    $("#captchaKey").val($.trim($("#captchaKey").val()));
    
    	    if ($("#captchaKey").val().length != 4)
    	    	{
    	        $("#captchaTable").before("<div class='error'>Captcha key must be 4 characters!</div>");
    	        return false;
    	    	}
    
    
    	    if (data == 'valid')
    	        {
    	            $("#captchaTable").hide();
    	            alert("Login Successful");
    
    	        });
    
    	    }
    	    else if(data  == 'reload')
    	    {
    	    	captchaReload();
    	    }
    	    else
    	    {
    	       $("#captchaTable").before("<div class='error'>" + data + "</div>");
    	    }
    	    	});
    	}
    
    
    
    		function captchaReload()
    		{
     		$("#captchaImage").attr("src", "/captcha?image=" + Math.random());
    		}
    
    		function clearLastErrorMsg()
    		{
    	    $(".error").remove();
    		}
    
    </script>
    
    </head>
    
    <body onload="captchaReload()">
    
    
    <form method="post" action="" name="TuningEffect">
    
    <table id="captchaTable" width="550" border="0" cellspacing="0" cellpadding="0" align="center">
    	<tr>
    	<td width="393">
    
    	<table width="100%"  border="0" cellspacing="0" cellpadding="5">
    
    		<tr>
    		<td width="42%">
    		<div align="left">LOGIN</div>
    		</td>
    		<td width="58%">
    		<div align="left"><input type="text" name="login_userid" class="TopTextbox" value=""></div>
    		</td>
    		</tr>
    
    		<tr>
    		<td width="42%">
    		<div align="left"><img style="cursor: pointer" onclick="captchaReload();"  alt="captcha key">
    		</div>
    		</td>
    
    		<td width="58%">
    		<div align="left"><input type="text" name="captchaKey" id="captchaKey" maxlength="4" >
    		</div>
    		</td>
    		</tr>
    
    		<tr>
    		<td width="42%">
    		<div align="left"></div>
    		</td>
    		<td width="58%">
    		<div align="left"><input type="button" onclick="validateCaptcha();" value="Login">
    		</div>
    		</td>
    		</tr>
    
    
    </table>
    
    </td>
    </tr>
    </table>
    
    
    </form>
    
    </body>
    
    <script type="text/javascript">
    document.TuningEffect.login_userid.focus();
    </script>
    
    </html>

  • #4
    New Coder
    Join Date
    May 2009
    Posts
    25
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Anybody can help?

    CAD


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •