Jump to content

Secure Image Captcha Installation (Please help)


apaunganhote

Recommended Posts

Hello all,

 

Sorry for my noob again. I want to get captcha image in my registration form and I tried to search captcha. I found that Secure Image captcha suit with my needs. I tried to install it and look their example form. But I didn't get like what i want. Because they didn't give us like that they shown in their demo.

 

I want to get like this demo exactly.

 

http://www.phpcaptcha.org/try-securimage/

 

In their example php, it's give like that, please kindly see the screen shot,

 

phptcapthca2bg4.jpg

 

phpcaptchayl1.jpg

 

In the second picture, it showing validating message, but when the validation message show, Image Verification and forms are disappear.

 

I want to get like one is like, the example they show, please kindly see the screen shot.

 

phpcaptcha3rs8.jpg

 

phpcaptcha4wf6.jpg

 

In the second picture of their example, validate message is shown upon and forms are not disappear.

 

The one I want is exactly like that one.

 

Can anyone help me out ? Please kindly help to me.

 

This is the example_form.php code, that give it in package.

 

<html>
<head>
  <title>Securimage Test Form</title>
</head>

<body>

<?php
if (empty($_POST)) { ?>
<form method="POST">
Username:<br />
<input type="text" name="username" /><br />
Password:<br />
<input type="text" name="password" /><br />

<!-- pass a session id to the query string of the script to prevent ie caching -->
<img src="securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>"><br />
<input type="text" name="code" /><br />

<input type="submit" value="Submit Form" />
</form>

<?php
} else { //form is posted
  include("securimage.php");
  $img = new Securimage();
  $valid = $img->check($_POST['code']);

  if($valid == true) {
    echo "<center>Thanks, you entered the correct code.</center>";
  } else {
    echo "<center>Sorry, the code you entered was invalid.  <a href=\"javascript:history.go(-1)\">Go back</a> to try again.</center>";
  }
}

?>

</body>
</html>

 

 

Thanks. Please help me.

Link to comment
Share on other sites

try this

quick example

 

<html>
<head>
  <title>Securimage Test Form</title>
</head>

<body>

<?php
//if (empty($_POST)) { //Remove  ?>
<form method="POST">
Username:<br />
<input type="text" name="username" /><br />
Password:<br />
<input type="text" name="password" /><br />

<!-- pass a session id to the query string of the script to prevent ie caching -->
<img src="securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>"><br />
<input type="text" name="code" /><br />

<input type="submit" value="Submit Form" />
</form>

<?php
// } else { //form is posted //remove
  include("securimage.php");
  $img = new Securimage();
  $valid = $img->check($_POST['code']);

  if($valid == true) {
    echo "<center>Thanks, you entered the correct code.</center>";
  } else {
    echo "<center>Sorry, the code you entered was invalid.  <a href=\"javascript:history.go(-1)\">Go back</a> to try again.</center>";
  }
}

?>

</body>
</html>

Link to comment
Share on other sites

try

<html>
<head>
  <title>Securimage Test Form</title>
</head>

<body>

<?php
if (empty($_POST)){ ?>
<form method="POST">
Username:<br />
<input type="text" name="username" /><br />
Password:<br />
<input type="text" name="password" /><br />

<!-- pass a session id to the query string of the script to prevent ie caching -->
<img src="securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>"><br />
<input type="text" name="code" /><br />

<input type="submit" value="Submit Form" />
</form>

<?php
} else { /
  include("securimage.php");
  $img = new Securimage();
  $valid = $img->check($_POST['code']);

  if($valid == true) {
    echo "<center>Thanks, you entered the correct code.</center>";
  } else {
    echo "<center>Sorry, the code you entered was invalid.  <a href=\"javascript:history.go(-1)\">Go back</a> to try again.</center>";
  }
}

?>

</body>
</html>

Link to comment
Share on other sites

Hello,

 

I think that is probably same with what they gave it in sample. That i paste code here at the very fist post.

 

I want the one about validating message is within in one page, like , when i click submit, it will show the validation message at the top and not disabling the form.

 

Please kindly check the example here. I want exactly like that one.

 

http://www.phpcaptcha.org/try-securimage/

 

Thank you.

Link to comment
Share on other sites

Okay fine try this..

 

<html>
<head>
  <title>Securimage Test Form</title>
</head>

<body>

<?php
if (!empty($_POST)){ //form is posted
  include("securimage.php");
  $img = new Securimage();
  $valid = $img->check($_POST['code']);

  if($valid == true) {
    echo "<center>Thanks, you entered the correct code.</center>";
  } else {
    echo "<center>Sorry, the code you entered was invalid.  <a href=\"javascript:history.go(-1)\">Go back</a> to try again.</center>";
  }
}

?>
<form method="POST">
Username:<br />
<input type="text" name="username" /><br />
Password:<br />
<input type="text" name="password" /><br />

<!-- pass a session id to the query string of the script to prevent ie caching -->
<img src="securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>"><br />
<input type="text" name="code" /><br />

<input type="submit" value="Submit Form" />
</form>

</body>
</html>

 

you should beable to update the text colour but this is pretty basic stuff, and should be posted in third party section

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.