When you try Synapse, then you can find demo sample for this in
disribution package. ;-)
--
Lukas Gebauer.
http://www.ararat.cz/synapse/ - Synapse Delphi and Kylix TCP/IP Lib.
You can do it easily with ICS. Use the HTTP client component to do exactly
what a browser do when submitting a form (Post or Get method). If you need
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 http://www.overbyte.be
--
Contribute to the SSL Effort. Visit
http://overbyte.delphicenter.com/eng/ssl.html
--
francoi...@overbyte.be
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
I already am using Indy 9. Is it not possible with Indy? If not then i'll try ICS.
Thanks and Regards
I don't see why you couldn't do this with INDY.
Off the top of my head I would do something like the following:
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.
> I already am using Indy 9. Is it not possible with Indy?
Yes, of course it is possible with Indy. TIdHTTP has a Post() method which
can accept post data. Have a look at the TIdMultiPartFormDataStream class.
Gambit
> 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 ?
Assuming the following HTML:
<form name="TrialForm" action="http://www.somesite.com/somescript.cgi"
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("http://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
You are actually looking for components which can support POST method (and
preferably have Wizard which will help you to build POST params)
Try Clever Internet Suite Version 3.1
http://clevercomponents.com/products/inetsuite/suite.asp
http://clevercomponents.com/products/inetsuite/suitev3release.asp
Aplso please check our articles:
Simulate a Web Submit Wizard with POST Request
http://clevercomponents.com/articles/article014/websubmitwizard.asp
Simulate a Web Form POST Request
http://clevercomponents.com/articles/article009/httppost.asp
Try our Online Demos code available at:
Simulate Submit Wizard
http://clevercomponents.com/products/inetsuite/demos/submitwizard.asp
Simulate Web Form Post Request
http://clevercomponents.com/products/inetsuite/demos/formpost.asp
Simulate Web Submit (Upload) File
http://clevercomponents.com/products/inetsuite/demos/submitfile.asp
Best regards,
CleverComponents Team
www.CleverComponents.com
"doesnotmatter" <no...@here.yet> wrote in message
news:3f335fa4$1...@newsgroups.borland.com...