get Capatcha back to user then submits it --PHP--

adeladel

Newbie
Joined
Mar 20, 2009
Messages
13
Reaction score
1
Hello all

I wonder if we use Curl to submit a form however there is a captcha that exists in that form, Can we get the capatcha back to user so he can write it manually then post it back to the form and submits it?

I remember that rapidleech script was doing something like this.

I will be glad if someone answers

Thanks in advance

Adel
 
yeh we can do that, it depends for which form you need it get done
 
Yes, first you would GET the page, extract the CAPTCHA image URL and load it onto the page.

Code:
  curl_setopt($ch, CURLOPT_URL, $URL);
  curl_setopt($ch, CURLOPT_POST, 0);
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1);
  $content = curl_exec ($ch);
  curl_close ($ch);

For example to show Gmails CAPTCHA
Code:
echo preg_replace('^(https://www.google.com/accounts/Captcha\?ctoken=.+)\'^', 
'<img src="$1" />', $content);

Then you can submit for the form data.
 
Last edited:
Back
Top