TStringList *post_data = new TStringList; TStringList *post_data_2 = new TStringList; String mail = Edit1->Text; String pass = Edit2->Text; String otv; String otv_2; try{ post_data->Add("email="+mail+"&pass="+pass+"&expire=&vk="); otv = IdHTTP1->Post("http://login.vk.com/?act=login",post_data); } __finally{} //-- регулярка hash AnsiString exp_hash="(id='s' value='(.+?)')"; TRegExpr* hash= new TRegExpr; // hash hash->Expression=exp_hash; // hash if(hash->Exec(otv)){ Memo1->Text = hash->Match[2]; }else{ Memo1->Text = "Error!"; } try{ post_data_2->Add("s="+hash->Match[2]); otv_2 = IdHTTP1->Post("http://vkontakte.ru/login.php?op=slogin",post_data_2); } __finally{} //Memo1->Text = IdHTTP1->Response->Connection; String Cooci; for(int i = 0;i<IdHTTP1->CookieManager->CookieCollection->Count;i++) { Cooci = Cooci + IdHTTP1->CookieManager->CookieCollection->Items[i]->CookieText; } Memo1->Text = Cooci;