Hi Looking with Analyzer I saw a cookie was generated from the PHP so I included the same string in the HTTPCLI.cookie property and now I have success with login.
Now I Have another issue after the login I do another HttpCli.get changing HttpCli.URL:='http:\\192.168.0.7:9090\index.php?c=restituzione/fromgest/ripa rato&wid=154308&stato=20&difetto=2105&causa=110&int=SW'; The problem is that with this URL a MYsql record is updated and a POP-UP windows is open to start a print operation, Using IE that works fine with HttpCli it spend lot of time (2 minutes) the record is updated but the URL is not redirected on the pop-up code. Looking with Analyzer the cookie string is the same of when have performed the login. Have you other suggestion? Is correct to do consecutive HttpCli.Get example: HttpCli.URL:='something1'; httpcli.get; HttpCli.URL:='something2'; httpcli.get; I hope I explained clear the problem. Thanks in advance for your help. Regards Rocco Neri -----Messaggio originale----- Da: Wilfried Mestdagh [mailto:[EMAIL PROTECTED] Inviato: martedì 18 luglio 2006 22.36 A: ICS support mailing Oggetto: Re: [twsocket] R: Http Post problem Hello Rocco, Log with SocketSpy or gpHttpProxy (user made) the difference with browser and THttpcli. This will show what is wrong. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Tuesday, July 18, 2006, 15:25, Rocco Neri wrote: > Francois > I tried to use the get method using the same URL I use with IE but > unfortunately I have the same negative responce with no possibility to log > to the application. > Other suggestion? > Regards > Rocco Neri > -----Messaggio originale----- > Da: Francois Piette [mailto:[EMAIL PROTECTED] > Inviato: martedì 18 luglio 2006 13.41 > A: ICS support mailing > Oggetto: Re: [twsocket] Http Post problem >> I have a problem using http component posting parameters to log into a PHP >> application. >> If I can log to using IE writing in the url area the following string: >> http.Post; > Since you enter the URL into IE address bar, you must use the same URL with > the HTTP component (including the parameters) and use the Get method. > Contribute to the SSL Effort. Visit > http://www.overbyte.be/eng/ssl.html > -- > [EMAIL PROTECTED] > Author of ICS (Internet Component Suite, freeware) > Author of MidWare (Multi-tier framework, freeware) > http://www.overbyte.be > ----- Original Message ----- > From: "Rocco Neri" <[EMAIL PROTECTED]> > To: <twsocket@elists.org> > Sent: Tuesday, July 18, 2006 12:03 PM > Subject: [twsocket] Http Post problem >> Hi >> >> >> >> I have a problem using http component posting parameters to log into a PHP >> application. >> >> >> >> If I can log to using IE writing in the url area the following string: >> >> >> >> http://localhost:9090/index.php?c=login/login >> > <http://localhost:9090/index.php?c=login/login&username=cnsp12&password=cnsp >> 12> &username=cnsp12&password=cnsp12 >> >> >> >> >> >> Using HTTP component with the following code I have no success indeed I >> can't log to the application receiving from the server the message "No > right >> for this operation" >> >> >> >> procedure NkCloseRip; >> >> var >> >> DataIn : TMemoryStream; >> >> DataOut : TMemoryStream; >> >> Buf, : String; >> >> http : THttpCli; >> >> mYres : TStringlist; >> >> begin >> >> DataIn := TMemoryStream.Create; { For the response } >> >> DataOut := TMemoryStream.Create; { For the data to be sent } >> >> mYres:=TStringlist.Create; >> >> http := THttpCli.Create(nil); >> >> { Build the data to be sent to the CGI. } >> >> Buf := 'c='+encode('login/login') + >> >> '&username=' +encode('cnsp12') + >> >> '&password=' + encode('cnsp12')+ >> >> '&Invia=' + encode('Invia'); >> >> { Write the data to the stream which will be used to send } >> >> DataOut.Write(Buf[1], Length(Buf)); >> >> { Position the stream at the beginning or nothing will be sent } >> >> DataOut.Seek(0, soFromBeginning); >> >> >> >> { Setup the HTTP component to transmit } >> >> http.SendStream := DataOut; >> >> http.RcvdStream := DataIn; >> >> >> >> Http.URL := 'http://localhost:9090/index.php'; ; >> >> try >> >> >> >> http.Post; >> >> { Data sent, copy the webserver response to the > DisplayMemo >> } >> >> DataIn.Seek(0, 0); >> >> myres.LoadFromStream(DataIn); >> >> >> >> except >> >> { An error occured ! } >> >> Showmessage('HTTP Failed : ' + Http.ReasonPhrase); >> >> >> >> end; >> >> DataOut.Free; >> >> DataIn.Free; >> >> >> >> end; >> >> >> >> >> >> What is wrong? >> >> >> >> Regards >> >> Rocco Neri >> >> >> >> -- >> To unsubscribe or change your settings for TWSocket mailing list >> please goto http://www.elists.org/mailman/listinfo/twsocket >> Visit our website at http://www.overbyte.be > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.1.394 / Virus Database: 268.9.6 - Release Date: 28/06/2006 -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.1.394 / Virus Database: 268.9.6 - Release Date: 28/06/2006 -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be