Q:
I've looked around several web sites on socket programming and so far I
can't find the answer to my question. How would one go about using sockets
to connect to a web site and download the public pages in either textual
or HTML format?
-*NAME-DELETED*
A:
The easiest way is to download the library CURL from http://curl.haxx.se
and use the functions provided by the library.
If you want to learn, then visit
http://www.ecst.csuchico.edu/~beej/guide/net/
to learn socket programming general. If you already know socket
programming but want to learn how to handle HTTP using pure socket
programming then go to
http://peter.verhas.com/progs/perl/webmirror
to see a Perl program (which handles sockest much like C) that implemenets
web page download without any extra module.
regards,
Peter
[ back to toc ]