...

View Full Version : Captcha on register page



Cntl_Alt_Del
05-24-2009, 02:13 PM
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. ;)

abduraooft
05-24-2009, 03:29 PM
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 (http://www.google.com/search?q=php%2Bcaptcha)

Cntl_Alt_Del
05-26-2009, 03:41 PM
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



<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>

Cntl_Alt_Del
05-27-2009, 05:18 PM
Anybody can help?

CAD



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum