dth96108 2012-04-15 13:01
浏览 1673
已采纳

无论我输入正确,CAPTCHA检查都会失败

I am using secureImage which is a simple way to implement captcha, i follow the guideline there to add the code, however, the checking is always invalid even i have input the correct value

It is the website of that plugin, within ten lines of code:

And this is my code:

in html form

<img id="captcha" src="http://www.phpcaptcha.org/securimage3/securimage_show.php?0.6905195268336684" alt="CAPTCHA Image">

<input type="text" class="required" name="captcha_code" size="10" maxlength="6">

in verification php

include_once '../plugin/securimage/securimage.php';

$securimage = new Securimage();


if ($securimage->check($_POST['captcha_code']) == false) {
  die ("<div class='alert alert-success'><strong>The security code entered was incorrect.</strong><br /><br />Please go <a href='javascript:history.go(-1)'>back</a> and try again.</div>");
}

I have checked the post value, that is exactly what i have inputted. I would like to know which data the plugin used to compare with my input, however, i can not do this by echo the $secureimage

Thank you

  • 写回答

2条回答 默认 最新

  • doudiyu1639 2012-04-15 16:29
    关注

    To compare the randomly generated image with the code entered by a user a valid session is required. Please check this quick start guide and read the section about putting session_start() on top of your PHP script.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥50 求图像处理的matlab方案
  • ¥50 winform中使用edge的Kiosk模式
  • ¥15 关于#python#的问题:功能监听网页
  • ¥15 怎么让wx群机器人发送音乐
  • ¥15 fesafe材料库问题
  • ¥35 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信