YBthebest Posted October 20, 2010 Share Posted October 20, 2010 Hello all ! My question is: I've got an image: http://extreme-redeemer.com/math_captcha/image.php I want to "decrypt" it, to get 3 different parts. The first number, the operatror and the last number. I actually want to be able to make this operation in PHP. I know PHP well, but I'm not familiar with the GD library! Thank you so much! Quote Link to comment https://forums.phpfreaks.com/topic/216375-php-manipulate-an-image-with-gd/ Share on other sites More sharing options...
The Little Guy Posted October 20, 2010 Share Posted October 20, 2010 Do you have the code to generate the image? Quote Link to comment https://forums.phpfreaks.com/topic/216375-php-manipulate-an-image-with-gd/#findComment-1124439 Share on other sites More sharing options...
ram4nd Posted October 20, 2010 Share Posted October 20, 2010 You type "My question is:", but then there's no question Quote Link to comment https://forums.phpfreaks.com/topic/216375-php-manipulate-an-image-with-gd/#findComment-1124561 Share on other sites More sharing options...
YBthebest Posted October 20, 2010 Author Share Posted October 20, 2010 Hey! Well after My question: there is: I've got an image: http://extreme-redeemer.com/math_captcha/image.php I want to "decrypt" it, to get 3 different parts. The first number, the operatror and the last number. I actually want to be able to make this operation in PHP. I know PHP well, but I'm not familiar with the GD library! Thank you so much! And The Little Guy, http://pastebin.com/eu9UBmvm there you go! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/216375-php-manipulate-an-image-with-gd/#findComment-1124604 Share on other sites More sharing options...
The Little Guy Posted October 20, 2010 Share Posted October 20, 2010 Is there any reason you don't want to get it from the code? $second_num $operators[0] $first_num Quote Link to comment https://forums.phpfreaks.com/topic/216375-php-manipulate-an-image-with-gd/#findComment-1124608 Share on other sites More sharing options...
YBthebest Posted October 20, 2010 Author Share Posted October 20, 2010 Well this code is not on my page, but on another page. Just imagine I've got 2 files. The first one will simply make the image, and the 2nd one will get the image through...JS maybe, and then I need to get the 3 thingies... Do you understand? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/216375-php-manipulate-an-image-with-gd/#findComment-1124612 Share on other sites More sharing options...
DavidAM Posted October 20, 2010 Share Posted October 20, 2010 If you are developing a CAPTCHA system for your site, I would suggest passing the numbers and operator - or even simpler, just the answer - in a session rather than trying to OCR the image. If you can OCR your image, then someone else can OCR your image and the CAPTCHA becomes usless. If you are trying to OCR a CAPTCHA so you can spam some other site ... well, shame on you. Quote Link to comment https://forums.phpfreaks.com/topic/216375-php-manipulate-an-image-with-gd/#findComment-1124614 Share on other sites More sharing options...
YBthebest Posted October 20, 2010 Author Share Posted October 20, 2010 Hey, don't judge to quickly. I really AM NOT gonna spam a website, seriously, not. I saw that code on a website, a romanian PHP website, and I wanna see till where it helps. I know that there are lots of OCR php script, well not alot but they exist, but they have difficulty with numbers...Ithat's why I'm asking it here. If you don't want to help me, because it's captcha "cracking", I can understand! Thanks Quote Link to comment https://forums.phpfreaks.com/topic/216375-php-manipulate-an-image-with-gd/#findComment-1124618 Share on other sites More sharing options...
DavidAM Posted October 20, 2010 Share Posted October 20, 2010 Sorry, I did not mean to offend you. I guess I need to make more use of the smileies But what I was saying was that if you make the image clear enough so YOU can OCR it, then it is not going to protect much since the bad guys can OCR it, too. If you look at line 71 of the code you posted, the answer to the CAPTHA is placed in the session $_SESSION['security_number'] = $session_var; so your second page can just compare the user's answer with the value in the session. It will be much easier to do, more secure, and will use less system resources. Quote Link to comment https://forums.phpfreaks.com/topic/216375-php-manipulate-an-image-with-gd/#findComment-1124652 Share on other sites More sharing options...
YBthebest Posted October 21, 2010 Author Share Posted October 21, 2010 Ah thank you...that was very dumb of me Saves me lots of work, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/216375-php-manipulate-an-image-with-gd/#findComment-1124868 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.