preg_match('#<noscript><iframe frameborder="0" height="300" src="(.*)" width="500">#', $page, $capch_url);
$page = $curl->get($capch_url[1]); $post=$capch_url[1];
preg_match('#<img id="recaptcha_image" width="300" height="57" alt="" src="(.*)">#', $page, $capch_url);
$capch_url='https://api-secure.recaptcha.net'.$capch_url[1];
preg_match('#<input type="hidden" name="recaptcha_challenge_field" id="recaptcha_challenge_field" value="(.*)" />#', $page, $recaptcha_challenge_field);
$page = $curl->get($capch_url);
$file=fopen("capch.jpg", "w");
fwrite ($file, $page);
fclose ($file);
// Распознаем капчу ==>
$code=trim(recognize('capch.jpg', $apikey, $is_verbose, $rtimeout, $mtimeout, $is_phrase, $is_regsense, $is_numeric, $min_len, $max_len));
$page = $curl->post($post, array(
'recaptcha_challenge_field' => $recaptcha_challenge_field[1],
'recaptcha_response_field' => $code,
'submit' => 'I%27m+a+Human'
)
);
preg_match ('#<textarea rows="3" cols="40">(.*)</textarea>#smi', $page, $capch_key);
$fields['recaptcha_challenge_field']=$capch_key[1];
$fields['recaptcha_response_field']='manual_challenge';