decaptcher help via php

There was a decaptcher script posted here to be used in conjuction with imacros. I'll have a search for it tomorrow and edit this post. If I can't find the thread I'll upload the files I have. :)
 
Wouldn't you use cURL to send the multipart/post data? I'm not sure on the program you are working on. I'm assuming the program is in PHP and running on your server. Which you'd need to download the captcha image (file_get_contents/file_put_contents) and then send it via cURL with your credentials. The cURL response will be the answer string.
 
I've made the register then upload captcha image to my server, however decaptcher.com api doesn't make much sence to me.
Where do I POST to via Curl? and what are the things I send through by post?

Is there an example somewere? There 'download' example page just gives me some very long php that isn't needed to make it work. I just want to no how to use there api so I can implant it to my scripts :)
 
If you look on their downloads page, you'll see an example of an HTML form submit where you put in your decaptcher login, password and choose the image location of your picture. You would just mimic that in PHP.

Code:
$ch = curl_init();
$data = array('username' => 'UserName', 'password' => 'PassWord', 'pict' => '@/path/to/image.jpeg');
curl_setopt($ch, CURLOPT_URL, 'http://poster.decaptcher.com/');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$dataReturned = curl_exec($ch);

You'll need to add the other values too, but this is their html form example.

HTML:
<form 
 method="post" 
 action="http://poster.decaptcher.com/" 
 enctype="multipart/form-data">
 <input type="hidden" name="function"  value="picture2">
 <input type="text"   name="username"  value="client">
 <input type="text"   name="password"  value="qwerty">
 <input type="file"   name="pict">
 <input type="text"   name="pict_to"   value="0">
 <input type="text"   name="pict_type" value="0">
 <input type="submit" value="Send">
</form>
 
THANK YOU SIR! I have it all working now :) Well now for the next step, verify email address :-\ but I'm sure I can just Google that :D
 
Back
Top