Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solving captcha with PHP? Personal challenge?

Tags:

php

captcha

I want to see if I can solve captchas with PHP for a bit of a personal challenge. Nothing too hard; words in the same line, words always in same colour, etc. Here's an example.

http://www.simplyshows.com/img.jpg

Just wanted to see how hard would it be. My question is, are there PHP based function which I can use to check pixel by pixel for colour etc? I want to divide the letters and then do a load of checks to determine if the letter is upper case, lower case, and what it can be (depending on coordinates on colours)

like image 280
Saulius Antanavicius Avatar asked Mar 03 '26 13:03

Saulius Antanavicius


1 Answers

If you're really interested in solving it from the ground up like this, start with libraries like GD and ImageMagick.

If you're interested in getting it done faster by leveraging the work of others, use Google or StackOverflow to see if there's a usable OCR library/project for PHP.

Lastly, I know you said you just want to do it for fun. Still, PHP has many strengths, but I don't think I would choose it for heavy-duty image processing and AI. You may wish to consider other languages with more robust and rich support for those sorts of things if you find yourself getting serious about this. But if it's just for fun, well, have fun!

like image 97
Trott Avatar answered Mar 05 '26 03:03

Trott