-
May 2nd, 2006, 07:21 PM
#1
Posting data to a CGI script
Dear all,
I would like to know how to post data to a CGI script from a windows application. I've searched for answers days but couldn't find a right answer.
If you go to the following webpage, it allows chemical structure searches. http://pubchem.ncbi.nlm.nih.gov/search/
For example, if you enter C1=CC=CC=C1 to the 'Search SMILES and Formula' text box and click the 'Search' button,
it will send data to
http://pubchem.ncbi.nlm.nih.gov/search/PreQSrv.cgi
I would like to implement this function directly onto my program.
Would anyone please let me know
1. how to post data to a CGI script?
2. get the result back?
Your kind help would greatly help me.
Thank you so much in advance,
Best,
Mike
-
May 3rd, 2006, 04:15 AM
#2
Re: Posting data to a CGI script
You can do what you want with the CSocket class or the winsock control.
Here's my post on how to use Winsock or the CSocket class to POST data to a web page:
http://www.codeguru.com/forum/showth...013#post701796
Let us know how it goes.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
May 3rd, 2006, 07:54 AM
#3
Re: Posting data to a CGI script
Thanks WizBang,
I found out that I post my thread to a wrong forum. It should be in Visual Basic .Net not 6.0. I am sorry about that.
Would you let me know how to do same thing in VB .NET if are aware of?
Thank you and I will put this post .NET forum as well.
Best,
Mike
-
May 3rd, 2006, 08:45 AM
#4
Re: Posting data to a CGI script
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
May 3rd, 2006, 08:50 AM
#5
Re: Posting data to a CGI script
The data you send in the POST to the server will be the same no matter what language you are using, and I'm sure there are numerous threads showing how to use winsock or equivelent for it. If not, then Google will surely turn up something. Now that you have the format for the POST, the rest will be fairly simple I'm sure.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
May 4th, 2006, 03:59 PM
#6
Re: Posting data to a CGI script
Take a look at the WebClient class.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|