Sarah07 Posted July 6, 2011 Share Posted July 6, 2011 Friends, I am developing an application for automating certain web related tasks. The problem arises where the CAPTCHA part comes. I am NOT looking for a solution to solve the captcha melodramatically because that is not what I want to do. What I am trying to achieve is... Assume that there is a website http://domain.com with a CAPTCHA in it. I am using php + cURL to post the form that is there in that site but before I post the data, I want to solve the CAPTCHA manually. So, is there a way I can extract that captcha and display it in a pop up (as a part of my application).. then I can manually enter the value for the CAPTCHA in my pop up and on click Submit or OK button of my pop up, the data will be posted to the site along with the captcha. Is there any way to achieve this in PHP? PS: I have tried this using a scripting add-on called iMacros and it was simple to do it there using the syntax PROMPT Please<SP>enter<SP>Captcha: !VAR1 Link to comment https://forums.phpfreaks.com/topic/241222-extract-a-websites-captcha-and-show-it-in-a-pop-up/ Share on other sites More sharing options...
xyph Posted July 6, 2011 Share Posted July 6, 2011 Here's how you might download an image using cURL http://www.bitrepository.com/download-image.html Keep in mind you'll have to keep cookie data, so the CAPTCHA script know's it's you coming back. This may be tricky. Most forms using CAPTCHAs are designed to be hard to bot, even if the bot's trying to be legit. Link to comment https://forums.phpfreaks.com/topic/241222-extract-a-websites-captcha-and-show-it-in-a-pop-up/#findComment-1239094 Share on other sites More sharing options...
Sarah07 Posted July 6, 2011 Author Share Posted July 6, 2011 Thanks xyph both for the guidance and reference. I will look into it now. Thank you! Link to comment https://forums.phpfreaks.com/topic/241222-extract-a-websites-captcha-and-show-it-in-a-pop-up/#findComment-1239103 Share on other sites More sharing options...
Sarah07 Posted July 7, 2011 Author Share Posted July 7, 2011 Hi again, I may just sound dumb but how do I get that sample code working for a site which has a captcha in it? I mean I know what is the URL from where the Captcha is generated everytime (say for example its on http://domain.com/trigger/captcha/?42572522 So, In that sample code provided in that reference blog, I used $image->source ='http://www.domain.com/trigger/captcha/?42572522'; It threw couple of warnings and said The image has been saved but the captcha was not saved. Any guidance please? Link to comment https://forums.phpfreaks.com/topic/241222-extract-a-websites-captcha-and-show-it-in-a-pop-up/#findComment-1239555 Share on other sites More sharing options...
xyph Posted July 7, 2011 Share Posted July 7, 2011 Hard to say without code. Even then, you're getting into some complicated cURL functionality here. It's going to be a lot of research and testing, for something that might not work in the end. Link to comment https://forums.phpfreaks.com/topic/241222-extract-a-websites-captcha-and-show-it-in-a-pop-up/#findComment-1239704 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.