Привет , сегодня хочу выложить скрипт флуда, в обсуждениях.
Ну вот короче вам скрипт, запускать с интервалом 3 сек.
<?$mail = "proroot.ru"; // Маил или логин$pass = "proroot.ru"; //Пароль$link = "-30865815_25310545"; //Тему которую флудить$text = "^_^"; // Текст$sleep = 3; // Время между отправкой,у меня на 3 сек,каптчи почти нету.$antigate = ""; function vk_hash($str) {$str = substr($str,-5).substr($str,4,-8);return strrev($str);}$otvet=connect("http://login.vk.com/?act=login&email=$mail&pass=$pass");If(!preg_match("/hash=(.*?)&/",$otvet,$hash)){die("Login incorrect");}$otvet=connect("http://vkontakte.ru/login.php?act=slogin&fast=1&hash=".$hash[1]."&s=1");preg_match("/remixsid=(.*?);/",$otvet,$sid);function curl($url, $cookie = false, $post = false, $header = false, $follow_location = false) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_HEADER, $header); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $follow_location); if ($cookie) { curl_setopt ($ch, CURLOPT_COOKIE, $cookie); } if ($post) { curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); } $response = curl_exec ($ch); curl_close($ch); return $response;}class AntiGate { private $key; private $api_url; function __construct ($key, $api_url = 'http://antigate.com') { $this->key = $key; $this->api_url = $api_url; } function addImage($filename, $phrase = 0, $regsense = 0, $numeric = 0, $calc = 0, $min_len = 0, $max_len = 0) { $post['key'] = $this->key; $post['method'] = 'post'; $post['file'] = '@'.$filename; $post['phrase'] = $phrase; $post['regsense'] = $regsense; $post['numeric'] = $numeric; $post['calc'] = $calc;$post['is_russian'] = 2; $post['min_len'] = $min_len; $post['max_len'] = $max_len; $response = curl($this->api_url . '/in.php',false,$post); $arr = explode('|', $response); $result = ($arr[0]=='OK') ? $arr[1] : $response; return $result; } private function api_request($action, $params = array()) { $params['key'] = $this->key; $params['action'] = $action; foreach ($params as $key=>$value) { $preurl[] = $key . '=' . $value; } $url = $this->api_url . '/res.php?'. implode('&',$preurl); $response = curl($url); return $response; } function getStatus($ids) { if (is_array($ids)) { $is_array = true; $ids = implode(',',$ids); $params['ids'] = $ids; } else { $params['id'] = $ids; } $response = $this->api_request('get',$params); $result = explode('|', $response); return $result; } function reportBad($id) { $params['id'] = $id; $response = $this->api_request('reportbad',$id); return $response; } function getBalance() { $response = $this->api_request('getbalance'); return $response; } function waitForText($id) { while (true) { sleep(3); $r = $this->getStatus($id); if ($r[0]=='OK') break; echo $r['0']."n";If ($r['0']!="CAPCHA_NOT_READY"){break;} } return $r[1]; } }function captcha($sid_captcha){$ag = new AntiGate($GLOBALS["antigate"]);$img_id = $ag->addImage("captcha$sid_captcha.jpg");$kod_captcha = $ag->waitForText($img_id);return $kod_captcha; } function connect($link,$cookie=null,$post=null){$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$link);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);curl_setopt($ch, CURLOPT_TIMEOUT, 0);curl_setopt ($ch, CURLOPT_HEADER, 1);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);if($cookie !== null)curl_setopt($ch, CURLOPT_COOKIE, $cookie);if($post !== null){curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS, $post);}$otvet = curl_exec($ch);curl_close($ch);return $otvet;}$cookie = "remixchk=5;remixsid=$sid[1]";$otvet = connect("http://vkontakte.ru/topic$link",$cookie);preg_match("/hash: '(.*?)',/",$otvet,$hash);while(1){$otvet=connect("http://vkontakte.ru/al_board.php",$cookie,"act=post_comment&al=1&comment=".urlencode(iconv('cp1251','utf-8', $text))."&hash=".$hash[1]."&last=2&topic=".$link."");while(1){If(preg_match('/<!>2<!>(.*?)<!>/',$otvet,$sid_captcha)){echo convert_cyr_string("Упс,каптча =(n","w","a");copy("http://vkontakte.ru/captcha.php?s=1&sid=$sid_captcha[1]", "captcha$sid_captcha[1].jpg");$kod_captcha=captcha($sid_captcha[1]);unlink ("captcha$sid_captcha[1].jpg");$otvet=connect("http://vkontakte.ru/al_board.php",$cookie,"act=post_comment&al=1&comment=".urlencode(iconv('cp1251','utf-8', $text))."&hash=".$hash[1]."&last=2&topic=".$link."&captcha_key=".$kod_captcha."&captcha_sid=".$sid_captcha[1]);}else{break;}}echo convert_cyr_string("Сообщение отправленно.n","w","a");sleep($sleep);}?>