I've recently completed a C text book course and want to try my hand at some real, "usable" applications. Something I use quite a lot is 'wget' to grab image files from an art website at the local collage. As a fun project, I wanted to try to write my own, simplified version of the program, as a way to get my feet wet using network interfaces and something that actually "does" something useful over the web. The whole reason I learned C was to start writing my own applications that integrate with the network, but my C book never even scratched the surface of this.
So I got the wget source code to try to pick over it and understand it, but it is way more complicated than I expected. There are just soooo many options in the source code. I tried to isolate some of the key pieces of code that allow it to function, but was totally lost in all the extra code to implement all its extra functions. Wget is a fine application, and I don't intend to duplicate it by any means - I just want to create an app with similar functions as a learning excersise.
What I would like to start building is a simple app that uses http to grab a .gif or .jpg image by passing a url, and write that image to the drive. I'd be pretty happy with that for starters. Problem is, I have no idea how to start integrating a c program to use the network interface, possibly domain name lookups, using a specific port (80 or whatever) and so on.
Are there any good tutorials out there that would help me start to bridge the gap from simple file reads off the local disk drive and understand how to do the same sort of operation over a network or http?
We've all got to start someplace.
Thanks for any help!!