Results 1 to 7 of 7

Thread: [RESOLVED] Picutre authentification

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Resolved [RESOLVED] Picutre authentification

    I have made a nice picture with random letters popping up. But I have a questions. When you do this, how do you compare what they write with the picture it self.

    I mean you have to store it somewhere as plain text don't you? And if you store it in the HTML then any bot can just read it. So what is the common practice for this kind of stuff?

    - ØØ -

  2. #2
    New Member
    Join Date
    Jun 2006
    Posts
    1

    Re: Picutre authentification

    i dont understand please explanation ?

  3. #3
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403

    Re: Picutre authentification

    I suppose the answer is you need to remember it somehow on the server. If you have started a session with session_start(), session_register(), etc, then you can simply add the correct response to the $_SESSION assoc. array:

    Code:
    $_SESSION['correct_answer'] = 'abfj124';
    
    
    // ....
    if ($_GET['correct_answer'] == $_SESSION['correct_answer'])
    {
       // ...
    }
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Picutre authentification

    We used a session var - another way would be to store the md5 of the code in the HTML. Session var is tidier though.

  5. #5

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: Picutre authentification

    Ahhh, heard about that. NEver tried it before. Will try it out, and tell you if I fail misserably..



    - ØØ -

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Picutre authentification

    Using sesisons is the only bot proof way, an MD5 can be forged easy enough. Simply add the session ID to one of the form variables or append it to the query string. No need to use a session cookie.

    I have a session handler which I will upload later.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  7. #7

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: [RESOLVED] Picutre authentification

    No need, I got it working. Even if the performance of my server these days is like someone is stuck on the F5 button on my front page.....




    - ØØ -

Posting Permissions

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



Click Here to Expand Forum to Full Width