Submitting HTML form and parse respons
I'm currently working on a project which requires data which can be retreived by filling in a HTML on the Internet and submitting it. The server then sends back something like this:
This is not in a HTML format, but raw code (a string is sent back with the data).
#### Begin of results ####
#### End of results (lines produced: 14) ####
My problem is as follows: I have written a program in C which needs this data. Therefore I want the C program to retrieve that information automatically. I think I have to write a piece of code which opens a socket, sends the appropriate HTML headers to the server, waits for the response and parse it, am I correct?
Requesting the information is done by sending an URL such as http://server/retrieve.cgi?parameter1=xx¶meter2=xx to the server.
Does anyone know a tutorial about a similar problem or a piece of example code which I can alter?
by the way, I'm writing my programs on my Linux box (don't know if that's important information).