Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Capcha

  1. #11
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Mike wrote in another thread that this could replace a captcha

    Code:
    $texts = array("el301kfs","s94kf9ds","si340fsk","4iogfd0h","49ffle95","fo40fsl4","903mvlsmf");
    $rand = rand(0,count($texts)-1);
    header("Content-type: image/png");
    $im = @imagecreate(80, 50)
       or die("Cannot Initialize new GD image stream");
    $background_color = imagecolorallocate($im, 255, 255, 255);
    $text_color = imagecolorallocate($im, 255, 0, 0);
    imagestring($im, 2, 6, 5, $texts[$rand], $text_color);
    imagepng($im);
    imagedestroy($im);
    But how do I place this ? In a .php ?

  2. #12
    Join Date
    Nov 2006
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    create a file called captcha-image.php

  3. #13
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    That is a very basic CAPTCHA. It will present no trouble whatsoever to bots, and will stop blind people from accessing your site.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #14
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    How can blind people access a computer anyway? Do they have special keyboards?
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  5. #15
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    So I save the above code as capcha-image.php. Do I place <?- before it ?
    And what code do I add in the form to see this .php file ?

  6. #16
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by tech_support View Post
    How can blind people access a computer anyway? Do they have special keyboards?

    Yes they do. Haven't you ever seen Sneakers?? ROTF
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #17
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    How can blind people access a computer anyway? Do they have special keyboards?
    Why would they need special keyboards? There's nothing to stop a blind person from typing, or even from learning to type (so long as some form of feedback is given telling them which key they're pressing).

    Text-to-speech technologies help a lot.
    So I save the above code as capcha-image.php. Do I place <?- before it ?
    And what code do I add in the form to see this .php file ?
    Don't bother. As I said above, the above script might as well not be there, and will cause more problems than it will solve.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #18
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Another solutions, if I wish to place captcha ?

  9. #19
    Join Date
    Nov 2006
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i think the basic problem there is that it uses only white and black.

Bookmarks

Posting Permissions

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