Results 1 to 3 of 3
  1. #1

    captcha problems...

    Ok so I've been trying for 3hours to make a working captcha script, I came pritty close few times however tehre's always something wrong

    So here's how it should be :p:
    I got this function that generates an 8 digit key that contains numbers and letters, I just want to place this on a png/jpg/gif/whatever image so that people have to enter the generated key into a textfield for anti spam validation. I got pritty close at one time however it only outputted the first letter/number instead of all of them :p

    The generating script:
    PHP Code:
    //use the random digit maker by: $i=makeRandomDigit(8,false); 
    function makeRandomDigit($passlength=20,$eqparts=false) {
    $errmsg="Funtion error: funtion random digit: Length must be positive<br />\r\n";
    $errmsg.="Funtion error: funtion random digit: 2nd parameter has to be true or false\r\n";
    $salt "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    $i 0;
        while (
    $i <= $passlength) {
    $num rand() % (strlen($salt)-1);
    $num>25 and $num<35:$teller[2]++;
    $num<61 :$teller[3]++;
    $tmp substr($salt$num1);
    $pass $pass $tmp;
    $teller[1]>=(int)($length/3) and $teller[2]>=(int)($length/3) and $teller[3]>=(int)($length/3)){
    $i 0;

    Is tehre a possibilty to do this with a trnasparent image cause it's on a pritty hard background otherwise >

  2. #2

  3. #3
    Join Date
    Nov 2005
    Last edited by bigfan; 11-02-2005 at 02:07 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts