Может кому удалось обойти фильтры, дело в том, что вручную регу проходит на ура, достаточно подтвердить акк по ссылке отправленный на мыло. Но скрипт мой выполнят все те же действия, но гугл палит меня, и просит ввести номер телефона прежде чем завершить регистрацию, ребята очень нужна помощь, кому удалось авторегнуться на гугле, в сети рабочих скриптов не попадались, все 2-х летней давности.. Понимаю что фишка вся в header заголовках, а разобраться не могу, юзер агент использую в точности что и мой браузер, так же и под мобильные менял, так же реферал указывал соответствующий.. В общем помогите разобраться в этом во всем, буду очень благодарен. PHP: <?php set_time_limit(0); header("Content-Type: text/html; charset=utf-8"); include('function2.php'); $email = urlencode('oepbmvdcec@mail.ru'); $pass = urlencode('ndkfrnlttz'); $apikey=' '; $text = open('http://m.youtube.com/', 'http://m.youtube.com/', '', '',basedir()."regger.txt",basedir()."regger.txt"); $text = open('http://m.youtube.com/my_account?gl=RU&hl=ru&client=mv-google', 'http://m.youtube.com/', '', '',basedir()."regger.txt",basedir()."regger.txt"); print $text = open('http://m.youtube.com/signup', 'http://m.youtube.com/', '', '',basedir()."regger.txt",basedir()."regger.txt"); preg_match_all('#name=\"createaccount\" action=\'(.*)\'#', $text, $matches, PREG_PATTERN_ORDER); $url = $matches[1][0]; preg_match_all('#value=\"([\\d-]{15,})\" />#', $text, $matches, PREG_PATTERN_ORDER); $dsh = $matches[1][0]; preg_match_all('#value=\"([\\w\\d-_:]{30,})\" />#', $text, $matches, PREG_PATTERN_ORDER); $newaccounttoken = $matches[1][0]; $newaccounturl = 'https%3A%2F%2Faccounts.google.com%2FCaptcha%3Fctoken%3D'.urlencode($matches[1][0]); $newaccounttoken_audio = $matches[1][1]; $newaccounturl_audio = 'https%3A%2F%2Faccounts.google.com%2FCaptcha%3Fctoken%3D'.urlencode($matches[1][1]); $img = file_get_contents(urldecode($newaccounturl)); file_put_contents($dsh.'.jpg',$img); $captcha=recognize($dsh.'.jpg', $apikey, false); echo $text = open($url, urlencode($url), '', 'dsh='.$dsh.'&ktl=&ktf=&Email='.$email.'&Passwd='.$pass.'&PasswdAgain='.$pass.'&PersistentCookie=yes&rmShown=1&smhck=1&nshk=1&loc=RU&Birthday=25%2C12%2C1978&newaccounttoken='.$newaccounttoken.'&newaccounturl='.$newaccounturl.'&newaccounttoken_audio='.$newaccounttoken_audio.'&newaccounturl_audio='.$newaccounturl_audio.'&newaccountcaptcha='.$captcha.'&privacy_policy_url=http%3A%2F%2Fwww.google.com%2Fintl%2Fru%2Fprivacy%2F&requested_tos_location=RU&requested_tos_language=ru&served_tos_location=RU&served_tos_language=ru&submitbutton=%D0%AF+%D0%BF%D1%80%D0%B8%D0%BD%D0%B8%D0%BC%D0%B0%D1%8E+%D1%83%D1%81%D0%BB%D0%BE%D0%B2%D0%B8%D1%8F.+%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%B9%D1%82%D0%B5+%D0%BC%D0%BE%D0%B9+%D0%B0%D0%BA%D0%BA%D0%B0%D1%83%D0%BD%D1%82.',basedir()."regger.txt",basedir()."regger.txt"); unlink(basedir()."regger.txt"); unlink(basedir().$dsh.'.jpg'); ?> function2.php PHP: <?php function basedir() { $base = ereg_replace("[a-z]{1,100}.php", " ", $_SERVER['SCRIPT_FILENAME']); $base = trim($base); return $base; } function open($url, $ref = '', $header = '', $post = '', $cookie = '', $cookiefile = '', $proxy = '', $timeout = '', $popitok = 10) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); if ($ref != '') curl_setopt($ch, CURLOPT_REFERER, $ref); if ($header != '') curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); if ($post != '') { curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); } if ($cookie != '') curl_setopt($ch, CURLOPT_COOKIE, $cookie); if ($cookiefile != '') { curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile); } if ($proxy != '') curl_setopt($ch, CURLOPT_PROXY, $proxy); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10'); curl_setopt($ch, CURLOPT_ENCODING, "gzip"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); if ($timeout != '') curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); $i = 0; do { $i++; flush(); $content = curl_exec($ch); } while ($i < $popitok && $content == '' || curl_errno($ch) != 0 && $i < $popitok); if (curl_errno($ch) != 0 || $content == '') { echo "<br><div style=\"border-style:solid; border-width:1px; width:750px; padding:10px; position:relative; border-color:#FF8000;\"><b><font color=\"#B30000\">Error CURL:</font></b> ".curl_error($ch)." | <b><font color=\"#B30000\">Error number:</font></b> ".curl_errno($ch)."<br> <b>Url: <a href='".$url."'> ".$url."</a></b></div><br><br>"; curl_close($ch); return false; } else { curl_close($ch); return $content; } } function gen($number) { $arr = array('a','b','c','d','e','f', 'g','h','i','j','k','l', 'm','n','o','p','r','s', 't','u','v','x','y','z'); // Генерируем пароль $pass = ""; for($i = 0; $i < $number; $i++) { // Вычисляем случайный индекс массива $index = rand(0, count($arr) - 1); $pass .= $arr[$index]; } return $pass; } function redirect($text,$username) { preg_match_all('#Location: (.*)\\s#', $text, $matches, PREG_PATTERN_ORDER); $url = trim($matches[1][0]); $text = open($url, 'http://vk.com', '', '',basedir().$username."cookie.txt",basedir().$username."cookie.txt"); return $text; } function ImgCURL($source,$save_to,$proxy=false) { $ch = curl_init($source); $fp = fopen($save_to, "wb"); $options = array(CURLOPT_FILE => $fp, CURLOPT_HEADER => 0, CURLOPT_TIMEOUT => 30); //если используешь прокси, то добавь строчку CURLOPT_PROXY => $proxy curl_setopt_array($ch, $options); curl_exec($ch); curl_close($ch); fclose($fp); } function recognize( $filename, $apikey, $is_verbose = true, $sendhost = "antigate.com", $rtimeout = 5, $mtimeout = 120, $is_phrase = 0, $is_regsense = 0, $is_numeric = 0, $min_len = 0, $max_len = 0, $is_russian = 0) { if (!file_exists($filename)) { if ($is_verbose) echo "file $filename not found\n"; return false; } $fp=fopen($filename,"r"); if ($fp!=false) { $body=""; while (!feof($fp)) $body.=fgets($fp,1024); fclose($fp); $ext=strtolower(substr($filename,strpos($filename,".")+1)); } else { if ($is_verbose) echo "could not read file $filename\n"; return false; } if ($ext=="jpg") $conttype="image/pjpeg"; if ($ext=="gif") $conttype="image/gif"; if ($ext=="png") $conttype="image/png"; $boundary="---------FGf4Fh3fdjGQ148fdh"; $content="--$boundary\r\n"; $content.="Content-Disposition: form-data; name=\"method\"\r\n"; $content.="\r\n"; $content.="post\r\n"; $content.="--$boundary\r\n"; $content.="Content-Disposition: form-data; name=\"key\"\r\n"; $content.="\r\n"; $content.="$apikey\r\n"; $content.="--$boundary\r\n"; $content.="Content-Disposition: form-data; name=\"phrase\"\r\n"; $content.="\r\n"; $content.="$is_phrase\r\n"; $content.="--$boundary\r\n"; $content.="Content-Disposition: form-data; name=\"regsense\"\r\n"; $content.="\r\n"; $content.="$is_regsense\r\n"; $content.="--$boundary\r\n"; $content.="Content-Disposition: form-data; name=\"numeric\"\r\n"; $content.="\r\n"; $content.="$is_numeric\r\n"; $content.="--$boundary\r\n"; $content.="Content-Disposition: form-data; name=\"min_len\"\r\n"; $content.="\r\n"; $content.="$min_len\r\n"; $content.="--$boundary\r\n"; $content.="Content-Disposition: form-data; name=\"max_len\"\r\n"; $content.="\r\n"; $content.="$max_len\r\n"; $content.="--$boundary\r\n"; $content.="Content-Disposition: form-data; name=\"file\"; filename=\"capcha.$ext\"\r\n"; $content.="Content-Type: $conttype\r\n"; $content.="\r\n"; $content.=$body."\r\n"; //???? ????? $content.="--$boundary--"; $poststr="POST http://$sendhost/in.php HTTP/1.0\r\n"; $poststr.="Content-Type: multipart/form-data; boundary=$boundary\r\n"; $poststr.="Host: $sendhost\r\n"; $poststr.="Content-Length: ".strlen($content)."\r\n\r\n"; $poststr.=$content; // echo $poststr; if ($is_verbose) echo "connecting $sendhost..."; $fp=fsockopen($sendhost,80,$errno,$errstr,30); if ($fp!=false) { if ($is_verbose) echo "OK\n"; if ($is_verbose) echo "sending request ".strlen($poststr)." bytes..."; fputs($fp,$poststr); if ($is_verbose) echo "OK\n"; if ($is_verbose) echo "getting response..."; $resp=""; while (!feof($fp)) $resp.=fgets($fp,1024); fclose($fp); $result=substr($resp,strpos($resp,"\r\n\r\n")+4); if ($is_verbose) echo "OK\n"; } else { if ($is_verbose) echo "could not connect to anti-captcha\n"; if ($is_verbose) echo "socket error: $errno ( $errstr )\n"; return false; } if (strpos($result, "ERROR")!==false or strpos($result, "<HTML>")!==false) { if ($is_verbose) echo "server returned error: $result\n"; return false; } else { $ex = explode("|", $result); $captcha_id = $ex[1]; global $super_captcha_id; $super_captcha_id = $captcha_id; if ($is_verbose) echo "captcha sent, got captcha ID $captcha_id\n"; $waittime = 0; if ($is_verbose) echo "waiting for $rtimeout seconds\n"; sleep($rtimeout); while(true) { $result = file_get_contents('http://antigate.com/res.php?key='.$apikey.'&action=get&id='.$captcha_id); if (strpos($result, 'ERROR')!==false) { if ($is_verbose) echo "server returned error: $result\n"; return false; } if ($result=="CAPCHA_NOT_READY") { if ($is_verbose) echo "captcha is not ready yet\n"; $waittime += $rtimeout; if ($waittime>$mtimeout) { if ($is_verbose) echo "timelimit ($mtimeout) hit\n"; break; } if ($is_verbose) echo "waiting for $rtimeout seconds\n"; sleep($rtimeout); } else { $ex = explode('|', $result); if (trim($ex[0])=='OK') return trim($ex[1]); } } return false; } } function flush_buffers(){ ob_end_flush(); ob_flush(); flush(); ob_start(); } ?>