hi there guys,

I'm making a down-n-dirty captcha for one of my sites, but I need some help.

I've pulled random values using MySQL, but in this case I'm not using a db to store anything, so I don't know how to do this.

My issue:

I've made a verification box in the user registration where the registrant descrambles a motorcycle manufacturer to register. What I need to do is for the form to pick a different preset manufacturer and then scramble it differently each time.

Honda
Yamaha
Suzuki

And we'll take Honda. It might come up onHad one time, and dHoan another.

How do I do this two step obfuscation process ??

thanks,
json

    $mfrs = array(
       'Honda',
       'Yamaha',
       'Suzuki'
    );
    $mfr = $mfrs[rand(0, count($mfrs) - 1)];
    $letters = array();
    for($i=0; $i<strlen($mfr); $i++)
    {
       $letters[] = $mfr[$i];
    }
    shuffle($letters);
    $anagram = implode('', $letters);
    echo $anagram;
    
      Write a Reply...