Board index » delphi » Posting data to forms
doesnotmatter
Delphi Developer |
doesnotmatter
Delphi Developer |
Posting data to forms2003-08-08 04:30:28 PM delphi158 Hi, Id like to know if its possible to have an application fill an online form with data and post it as well. The form posts data via cgi. If so how ? Thanks and regards |
Francois PIETTE
Delphi Developer |
2003-08-08 04:50:28 PM
Re:Posting data to formsQuoteId like to know if its possible to have an application fill an online form help, please use ICS support mailing list where a team will answer your questions and about 1000 subscribers wshare their experience with ICS. Download ICS full source code from www.overbyte.be -- Contribute to the SSL Effort. Visit overbyte.delphicenter.com/eng/ssl.html |
doesnotmatter
Delphi Developer |
2003-08-08 07:04:27 PM
Re:Posting data to forms
Hi Francois,
I already am using Indy 9. Is it not possible with Indy? If not then I will try ICS. Thanks and Regards "Francois PIETTE" <XXXX@XXXXX.COM>writes: Quote>Id like to know if its possible to have an application fill an online form |
Bradley Cunningham
Delphi Developer |
2003-08-09 12:44:03 AM
Re:Posting data to formsQuoteHi Francois, First do a HTTP GET to retrieve the HTML form you want to fill in. Then parse the HTML form and figure out what you need to fill in and fill it in. Then do a HTTP POST and submit the HTML form that you just parsed and filled in to the appropriate place. All of this can be done using the INDY HTTP client. |
Remy Lebeau (TeamB)
Delphi Developer |
2003-08-09 02:31:35 AM
Re:Posting data to forms
"doesnotmatter" <XXXX@XXXXX.COM>writes
QuoteI already am using Indy 9. Is it not possible with Indy? Gambit |
doesnotmatter
Delphi Developer |
2003-08-09 03:59:00 AM
Re:Posting data to forms
Hello,
Ok, the form has a few fields like "edit1", "edit2" ...etc and a submit button: "button1". The form is named "TrialForm" and the submit action is linked to a cgi script. So using idHTTP how can i get along this ? "Remy Lebeau \(TeamB\)" <XXXX@XXXXX.COM>writes: Quote
|
Remy Lebeau (TeamB)
Delphi Developer |
2003-08-09 04:41:09 AM
Re:Posting data to forms
"doesnotmatter" <XXXX@XXXXX.COM>writes
QuoteOk, the form has a few fields like "edit1", "edit2" ...etc method="post"> <input type="text" name="edit1"> <input type="text" name="edit2"> <input type="submit"> </form> You would do the following with Indy: var PostData: TIdMultiPartFormDataStream; Result: String; PostData := TIdMultiPartFormDataStream.Create; try PostData.AddFormField("edit1", "TextFromEdit1"); PostData.AddFormField("edit2", "TextFromEdit2"); Result := IdHTTP.Post("www.somesite.com/somescript.cgi", PostData); finally PostData.Free; end; Parsing out the values from the HTML is your own responsibility separately. Indy has no facilities for handling that. Gambit |
doesnotmatter
Delphi Developer |
2003-08-09 12:18:35 PM
Re:Posting data to forms
Thank you. Ill try this.
Regards "Remy Lebeau \(TeamB\)" <XXXX@XXXXX.COM>writes: Quote
|