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

Reply via email to