Simple Captcha

Discussion in 'PHP' started by ErsinAcar, Jun 8, 2007.

  1. #1
    developed by me :p
    Sample;
    [​IMG]

    Usage;
    <img src="imgcode.php">
    PHP:
    Download;
    http://rollonvideo.com/GD.zip
    Enjoy.
     
    ErsinAcar, Jun 8, 2007 IP
  2. calidude

    calidude Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Been looking for a captcha script, thanks! :D
     
    calidude, Jun 8, 2007 IP
  3. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #3
    • Will not work if cookies are disabled.
    • Will fail on a Windows servers if the random number is 3.
    • Will not work if short tags are disabled in php.ini
    • What's the purpose of the variable $yardir in index.php?

    Other than that's it's nice. A bit spammy though.
     
    nico_swd, Jun 8, 2007 IP
  4. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    [​IMG]

    Cleaner than the one i made just a few hours ago :| lol
     
    decepti0n, Jun 8, 2007 IP
  5. ErsinAcar

    ErsinAcar Peon

    Messages:
    201
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It's working.
    3.TTF chage file extension to ttf (lower)
    You can enable :)
    it's control variable for form submit and index.php a sample you can write your own form and script.


    Nice work ^^
     
    ErsinAcar, Jun 8, 2007 IP
  6. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #6
    Of course can you enable, but not everyone has access to the php.ini file, or can change values there. I'm just pointing out a few things that could be done better, so it works on any host without changing the configuration. :)

    This is just one of a few things you should keep in mind when you write public scripts. Always try to write it in a way that it works for everyone.
     
    nico_swd, Jun 8, 2007 IP
  7. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #7
    i couldn't have said it better myself. if you intend on writing and releasing a script you need to make sure that it's scalable across as many configurations as possible. short tags are nice and everything but i wouldn't recommend using them in scripts that are to be released into the public domain. as for the captcha itself, not bad.
     
    ansi, Jun 8, 2007 IP