
24.03.2009, 15:52
|
|
Новичок
Регистрация: 26.10.2008
Сообщений: 15
С нами:
9231707
Репутация:
6
|
|
Поднимаю пост номер #3088,т.к. так и не понял.
Кто знает,напишите строку с куки pls.
Вот ещё раз код :
Код:
procedure TForm1.Button1Click(Sender: TObject);
const
fact:shortString = 'http://torrents.ru/forum/login.php';
var
fGet,fPost:TStringList;
begin
fGet:=TStringList.Create;
fPost:=TStringList.Create;
IdHTTP1.AllowCookies:=true;
IdHTTP1.CookieManager:=IdCookieManager1;
IdHTTP1.HandleRedirects:=true;
With fPost do
begin //with
Add('redirect=index.php');
Add('cookie_test=');
Add('login_username=MyUser');
Add('login_password=MyPass');
Add('autologin=on');
Add('login=Âõîä');
end; //with
fGet.Text:=IdHTTP1.Post(fact,fPost);
If fGet.IndexOf('Âû çàøëè êàê') <> - 1 then
MessageBOX(Application.Handle,'Connected!',' OK!',mb_OK)
else
MessageBOX(Application,Handle,'unsucsess',':(', mb_OK);
IdHTTP1.Free;
IdCookieManager1.Free;
fGet.Free;
fPost.Free;
end;
Последний раз редактировалось f0rward; 24.03.2009 в 15:55..
|
|
|