логинюсь:
| Код | IdHTTP:=TIdHTTP.Create(nil); IdCookieManager:=TIdCookieManager.Create(IdHTTP); IdAntiFreeze:=TIdAntiFreeze.Create(IdHTTP); SSLIO:=TIdSSLIOHandlerSocket.Create(IdHTTP); IdHTTP.IOHandler:=SSLIO; SSLIO.SSLOptions.Method:=sslvTLSv1;
IdHTTP.CookieManager:=IdCookieManager; IdHTTP.AllowCookies:=True; IdHTTP.MaxLineAction:=maSplit; IdHTTP.ProxyParams.ProxyServer:=edProxyServer.Text; IdHTTP.ProxyParams.ProxyPort:=StrToInt(edProxyPort.Text); IdHTTP.HandleRedirects:=True; Str:=IdHTTP.Get('http://www.amazon.com/gp/sign-in.html/'); if(Pos('<form name="sign-in" action="',Str)>0)then begin NewAddress:=Str; Delete(NewAddress,1,Pos('<form name="sign-in" action="',NewAddress)+28); Delete(NewAddress,Pos('"',NewAddress),Length(NewAddress));
ListPost:=TStringList.Create; ListPost.Add('path=/gp/homepage.html'); ListPost.Add('useRedirectOnSuccess=0'); ListPost.Add('query=*entries*=0&*Version*=1'); ListPost.Add('mode='); ListPost.Add('redirectProtocol='); ListPost.Add('pageAction=/gp/homepage.html'); ListPost.Add('disableCorpSignUp='); ListPost.Add('email='+edEmail.Text); ListPost.Add('action=sign-in'); ListPost.Add('password='+adPassword.Text); ListPost.Add(''); try Str:=IdHTTP.Post(NewAddress,ListPost);except end; SaveFile('c:\3.html',Str); Str:=IdHTTP.Get('http://www.amazon.com/gp/homepage.html/'); SaveFile('c:\6.html',Str); end;
|
получается что при логине ребиректнуло на /gp/homepage.html/ и там (файл 'c:\3.html') видно что залогинился а вот потом при заходе тудаже (файл 'c:\6.html') видно никакого пользователя нету Почему не работают куки???? в этом случаи |