Proszę o pomoc:
function pobierzCaptcha() { $a = curl_init("http://nk.pl/flood_guard_captcha_verification?target=%2Finvite%2F46200582"); curl_setopt($a, CURLOPT_USERAGENT, SETUSERAGENT); curl_setopt($a, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($a, CURLOPT_COOKIEFILE, 'cookie.txt'); curl_setopt($a, CURLOPT_RETURNTRANSFER, 1); //curl_setopt($a, CURLOPT_RETURNTRANSFER, TRUE); $wynik=curl_exec($a); //curl_close($a); $tokener = $token[1][0]; $ch = curl_init('http://nk.pl/captcha'); curl_setopt($ch, CURLOPT_USERAGENT, SETUSERAGENT); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt'); //curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); //curl_close($ch); require_once 'deathbycaptcha.php'; $client = new DeathByCaptcha_SocketClient('LOGIN_DeathByCaptcha', 'PASSWORD_DeathByCaptcha'); if ($captcha = $client->decode('captcha.png', DeathByCaptcha_Client::DEFAULT_TIMEOUT)) { //$curlchanel = curl_init("http://nk.pl/flood_guard_captcha_verification?target=%2F"); $curlchanel = curl_init("http://nk.pl/flood_guard_captcha_verification?target=%2Fmain"); curl_setopt($curlchanel, CURLOPT_USERAGENT, SETUSERAGENT); curl_setopt($curlchanel, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($curlchanel, CURLOPT_COOKIEFILE, 'cookie.txt'); curl_setopt($curlchanel, CURLOPT_HEADER, 0); curl_setopt($curlchanel, CURLOPT_TIMEOUT, 6); curl_setopt($curlchanel, CURLOPT_RETURNTRANSFER, 0); //curl_setopt($curlchanel, CURLOPT_POSTFIELDS, trim("__captcha_a3e3={$captcha['text']}&auto_form_ticket=$tokener")); curl_setopt($curlchanel, CURLOPT_POSTFIELDS, trim("auto_form_ticket=$tokener&__utm_admin=%CE%9DO&__captcha_a3e3={$captcha['text']}&simple_button_submit=")); $wynik=curl_exec($curlchanel); // curl_close($curlchanel); } return $t; }