Reputation: 33
I am programming a small c++ program in Linux, and I want to submit a form from a local HTML file, but I can't figure out how to do it. I can't use wget or Qt because I have to give the destination URL, but I have to go throw the local HTML file because the information I want to send are relative to that local file dynamic content. I thought I can modify the HTML file to add value ="value" in each input tag and add a line of Javascript to submit the form and then open the HTML file with the default browser using a Linux command, but I can't figure out how to save the resulting web page. Can anyone help me? I really appreciate if someone can help me with this.
Upvotes: 0
Views: 521
Reputation: 1
If you want to send an HTTP POST
request from your C code, you want some C HTTP client library. Then I suggest to use libcurl
There are also C or C++ HTTP server libraries, such as Onion and Wt
Or maybe you just want to make a CGI or Fastcgi program. (several libraries could help you).
(or perhaps I misunderstood your question)
Upvotes: 1