Download html file using unix Download html file using unix unix unix

Download html file using unix


You might like to use libCURL, which is almost exactly what you describe.

There are sample applications here, and in particular this demonstrates how simple usage can be.

ref.


I wish there was some more context but you might be able to look at other programs like wget. wget is a common tool used for exactly this and it's old enough that it should have a simple makefile with few dependencies. Most Linux systems come with it preinstalled. CPP is almost backwards compatible with C, I can't say for certain but I work with C and often use CPP compilers when GCC is acting up.

Source for wget https://www.gnu.org/software/wget/

You should be able to build it from that or if you are determined to make your own use the source as a reference.

I hope this helps.