
15.07.2009, 03:17
|
|
Постоянный
Регистрация: 12.02.2009
Сообщений: 527
С нами:
9075146
Репутация:
0
|
|
Сообщение от Kener
Подскажите... как можно удалить все сообщения с лички? Все сразу удалить уже нельзя... а по 20 , 20к удалять довольно таки долго будет.. Спасибо.
PHP код:
<?
set_time_limit(0);
error_reporting(E_ERROR | E_PARSE);
function go($link){
$mail='свой@mail.ru';
$pass='пароль';
$id='и ид конечно же :)';
global $id;
$cookie='remixmid='.$id.'; remixemail='.$mail.'; remixpass='.md5($pass).'; remixlang=3; remixchk=5; remixap=1; '.$cookie_hash;
$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($a=0;$a<999999999999999999999999999999;$a) { ###запускаем цикл , пока не будет достигнуто количество заявок ]
$link="http://vkontakte.ru/mail.php?id=".$id;
$otvet=go($link, $cookie);
$count=substr_count($otvet,'delMsg');
print 'all msg=='.$count."\n\n";
for($i=0;$i<$count;$i++){
$end=$end+1;
$otvet = substr($otvet, $end);
$begin = 'delMsg(';
$begin = strpos($otvet, $begin) + strlen($begin);
$end = ',';
$end = strpos($otvet, $end, $begin);
$pm_id = substr($otvet, $begin, $end - $begin);
$res=go('http://vkontakte.ru/mail.php?act=a_delete&id='.$pm_id);
print $pm_id."\n";
}
$time=date('s',time());
$time=date('(d-m-Y) [H:i:s]',time());
print $_SERVER['PHP_SELF']."\n";
print $time."\n--------\n";
sleep(60);
}
?>
|
|
|