<?
set_time_limit(0);
error_reporting(E_ERROR | E_PARSE);
function go($link){
$mail='
Этот e-mail адрес защищен от спам-ботов, для его просмотра у Вас должен быть включен Javascript
';
$pass='pass';
$id='22671298';
$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;
}
Не знаете как запустить PHP - скрипт? Прочтите эту статью
$album_id='album-6968868_91639127'; //так выглядит айди альбома
$how_foto=17; //количество наших фоток. Обязательно установите этот параметр, иначе удалит ваши фотки вместе со спамом)
$otvet=go('http://vkontakte.ru/'.$album_id);
$begin = '"summary">';
$begin = strpos($otvet, $begin) + strlen($begin);
$end = ' ';
$end = strpos($otvet, $end, $begin);
$all_foto = substr($otvet, $begin, $end - $begin);
print "\nall foto==".$all_foto."\n\n";
$begin = '<a href="/photo';
$begin = strpos($otvet, $begin) + strlen($begin);
$end = '"';
$end = strpos($otvet, $end, $begin);
$foto_id = substr($otvet, $begin, $end - $begin);
$otvet=go('http://vkontakte.ru/photo'.$foto_id);
$count=substr_count($otvet,'["-');
$end=0;
for($i=0;$i<$count;$i++){
$otvet=substr($otvet,$end);
$begin = '["-';
$begin = strpos($otvet, $begin) + strlen($begin);
$end = '"';
$end = strpos($otvet, $end, $begin);
$foto_id = substr($otvet, $begin, $end - $begin);
if ($i<=$how_foto){ //количество наших фоток
print 'no spam';
}else{
$res=go('http://vkontakte.ru/photos.php?id=-'.$foto_id.'&act=do_fdelete');
}
print $i."\n";
}
print "\n\n----------\n(c) Le][\n";
?>

