Answer the question
In order to leave comments, you need to log in
Post request fails?
var
LoginData, Response: TStrings;
begin
LoginData := TStringList.Create;
Response := TStringList.Create;
Response.Text := idhtp1.Post('http://www.сайт.ru/vop/en/members/login.aspx?id=15',LoginData);
idhtp1.HandleRedirects:=true;
idhtp1.RedirectMaximum:=1;
LoginData.Add('TextBox1=пороль');
LoginData.Add('TextBox2=логин');
LoginData.Add('__VIEWSTATE=/wEPDwUJLTI0MTE1Nzg3D2QWBAIBD2QWAgIHDw8WAh4HVmlzaWJsZWhkZAIDDw8WAh4EVGV4dGVkZGR2NFVBFeEeY71EBQHL03G6jJXuxQ==');
LoginData.Add('__VIEWSTATEGENERATOR=261583EA');
LoginData.Add('__EVENTVALIDATION=/wEWBAL/+amRAgLs0bLrBgLs0fbZDAKM54rGBnsveKYDayDMIAFMQZrF5+2kIAdA');
LoginData.Add('Button1=submit');
if Pos ('logout',Response.Text)<> 0 then
lbl1.Caption := 'Успешная авторизация'
else
lbl1.Caption:= 'Авторизация не удалась' ;
end;
Answer the question
In order to leave comments, you need to log in
Hello.
LoginData.Add('__VIEWSTATE=/wEPDwUJLTI0MTE1Nzg3D2QWBAIBD2QWAgIHDw8WAh4HVmlzaWJsZWhkZAIDDw8WAh4EVGV4dGVkZGR2NFVBFeEeY71EBQHL03G6jJXuxQ==');
LoginData.Add('__VIEWSTATEGENERATOR=261583EA');
LoginData.Add('__EVENTVALIDATION=/wEWBAL/+amRAgLs0bLrBgLs0fbZDAKM54rGBnsveKYDayDMIAFMQZrF5+2kIAdA');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question