Jump to content

Extract a website's CAPTCHA and show it in a pop up


Sarah07

Recommended Posts

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 

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.

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?

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.