Jump to content
  • Advertisement
Sign in to follow this  
levjs

[web] App to CGI to APP

This topic is 4390 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, How would I have an application, run on a customer's computer, pass a variable to and run a CGI script on my webserver. Then, depending on what the variable was, how would I send the application on my customer's back a TRUE or FALSE message? Can this be done? The app on the customer's computer would be a C++ app run on windows. Thanks Levi

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
You'd use the POST or GET method, as described in the HTTP RFC [1]. The CGI will write the result to stdout and the webserver will send it back "as-is" to the client. You'll have to parse the returned result and convert it to a boolean value.

Alternatively, you could use a web service: that's what they were designed for. If you must use a web server, then it's an option.


Hope this helps.

[1]. HTTP 1.0: http://www.w3.org/Protocols/rfc1945/rfc1945, HTTP 1.1: http://www.w3.org/Protocols/rfc2616/rfc2616.html

Share this post


Link to post
Share on other sites
Ooh, simple enough. So the only reason it sends it to IE or whatever browswer is running when I call the CGI script on my web browser is because the web browser called it. : ) I like that!

So how would I call a cgi script from a C/C++ program? Would something like CreateProssecc work?
Thanks
Levi

Share this post


Link to post
Share on other sites
Just find a simple HTTP client library for C++, e.g. libcurl: http://curl.haxx.se/libcurl/

Share this post


Link to post
Share on other sites
Thank you SOO much. I believe I have everything I need now to complete this project. Thanks SOOOOOOOO much.
Levi

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!