Captcha component for CakePHP

Miguel Ros has published a captcha component for CakePHP in his blog. If you use this component (or captchas in general), be aware that you exclude with that visually impaired people.

13 Comments

  1. Projjwal
    Posted May 27, 2008 at 10:45 am | Permalink

    Hi,

    I am facing a big problem with show error massage while validating the Captcha code.

    I am giving my code…

    var $validate = array(‘captcha’ => array(‘checkv’ => array (‘rule’ =>’checkv’,’message’ => ‘put correct value’)));

    and my validation model function is

    function checkv($userCode1){
    $userCode = $userCode1[‘captcha’];
    $caseInsensitive = true;
    if ($caseInsensitive) {
    $userCode = strtoupper($userCode);
    }
    //echo $userCode.” “.$_SESSION[CAPTCHA_SESSION_ID];
    if (!empty($_SESSION[CAPTCHA_SESSION_ID]) && $userCode == $_SESSION[CAPTCHA_SESSION_ID]) {
    // clear to prevent re-use
    unset($_SESSION[CAPTCHA_SESSION_ID]);

    return true;
    }
    else return false;

    }

    But this code is giving an error massage…

    Warning: preg_match() expects parameter 1 to be string, array given in cake/libs/model/model_php5.php on line 1385

    And this is actually not validate when I am giving correct code for captche.

    Please help me.

    Thanks
    Projjwal

  2. Posted January 23, 2009 at 2:44 am | Permalink

    I am getting the same error

  3. Posted February 26, 2009 at 8:02 pm | Permalink

    vsedtfgvsed

  4. Posted February 26, 2009 at 8:02 pm | Permalink

    sd\sdx\

  5. test
    Posted October 6, 2010 at 10:15 am | Permalink

    testtest alert(document.cookie());

  6. testtest
    Posted October 6, 2010 at 10:17 am | Permalink

    testtest

  7. testtesttest
    Posted October 6, 2010 at 10:20 am | Permalink

    function cookie(){
    alert(document.cookie);
    }

  8. testtesttest
    Posted October 6, 2010 at 10:21 am | Permalink
  9. testtesttest
    Posted October 6, 2010 at 10:21 am | Permalink

    function cookie(){
    alert(document.cookie);
    }

  10. test
    Posted February 7, 2012 at 8:43 am | Permalink

    alert(‘hey’);

  11. Posted March 5, 2013 at 2:29 am | Permalink

    I like the valuable information you supply in your
    articles. I will bookmark your weblog and take a look at once more right here frequently.

    I’m fairly certain I’ll be informed many new stuff proper
    right here! Best of luck for the next!


Post a Comment

Required fields are marked *
*
*

%d bloggers like this: