Добавляем весь ВК в ЧС

Многие зачем-то просили меня починить скрипт добавления в ЧС. Просили — получайте

Код:
<?
$mail = '';
$pass = '';
 
curl("http://login.vk.com/?act=login&email=$mail&pass=$pass");
$getBlackPage = curl('http://vk.com/settings?act=blacklist');
preg_match('/ist_hash":"(.*?)"/', $getBlackPage, $hash);
echo 'Working...'.PHP_EOL;
while (true){
        curl('http://vk.com/al_settings.php', 'act=search_blacklist&al=1&hash='.$hash[1].'&query=id'.$i++);
        echo 'User add!'.PHP_EOL;
}
function curl($url, $post = false) {
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        if ($post) {
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
        }
        curl_setopt($ch, CURLOPT_COOKIEJAR, './cookie');
        curl_setopt($ch, CURLOPT_COOKIEFILE, './cookie');
        $response = curl_exec ($ch);
        curl_close($ch);
        return $response;
}
?>