gerry
31.08.2009, 12:10
<?
$qwe = 3000; // количество предложений, на которые хотите ответить
$cookie="";
function connect($link){
$cookie = ""; // <-- куки!
$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_GET, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
$otvet = curl_exec($ch);
curl_close($ch);
return $otvet;
}
for($i=1;$i<$qwe;) {
$st = rand (0, 49)*10;
$bday = rand(1987, 1990);
$str = connect("http://vkontakte.ru/search.php?subm=1&act=adv&sex=1&uni_city=1&bday_year=$bday&online=1&o=0&st=$st");
$c = substr_count($str, 'addToFriends');
echo iconv ('cp1251', '866', "\nНайдего $c человек!\n\n");
for ($i=0; $i<$c; $i++) {
$start = 'addToFriends(';
$end = ',';
$start = strpos($str, $start) + strlen($start);
$end = strpos($str, $end, $start);
$id = substr($str, $start, $end - $start);
$res = connect ("http://vkontakte.ru/matches.php?act=a_search&st=0&c=1&s=1&y=0&id=$id");
echo iconv ('cp1251', '866', "\n$res\n\n");
echo iconv ('cp1251', '866', " Принято предложение: $i из $c\n");
sleep (1);
}
}
echo "\n\n\n\nSCRIPT STOPPED! \n (c) gerry\n\n\n\n\n";
?>
$qwe = 3000; // количество предложений, на которые хотите ответить
$cookie="";
function connect($link){
$cookie = ""; // <-- куки!
$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_GET, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
$otvet = curl_exec($ch);
curl_close($ch);
return $otvet;
}
for($i=1;$i<$qwe;) {
$st = rand (0, 49)*10;
$bday = rand(1987, 1990);
$str = connect("http://vkontakte.ru/search.php?subm=1&act=adv&sex=1&uni_city=1&bday_year=$bday&online=1&o=0&st=$st");
$c = substr_count($str, 'addToFriends');
echo iconv ('cp1251', '866', "\nНайдего $c человек!\n\n");
for ($i=0; $i<$c; $i++) {
$start = 'addToFriends(';
$end = ',';
$start = strpos($str, $start) + strlen($start);
$end = strpos($str, $end, $start);
$id = substr($str, $start, $end - $start);
$res = connect ("http://vkontakte.ru/matches.php?act=a_search&st=0&c=1&s=1&y=0&id=$id");
echo iconv ('cp1251', '866', "\n$res\n\n");
echo iconv ('cp1251', '866', " Принято предложение: $i из $c\n");
sleep (1);
}
}
echo "\n\n\n\nSCRIPT STOPPED! \n (c) gerry\n\n\n\n\n";
?>