Mail Archives: djgpp/2000/11/03/18:45:16
"mike" <my DOT address AT end DOT of DOT article> wrote:
> Many thanks, Damian, but you obviously think you are talking to someone who
> knows what he's doing. In fact, although I know C pretty well within the
> enclosed environment of the PC, I have never ventured further outside of it
> than the serial port. I have never attempted anything using TCP/IP.
>
> Is there anything you could feed me to get me under way? I already know what
> HTTP looks like, and can get the specs, but I don't know anything about
> sockets or lynx-source. I'm not looking for anybody to do it for me, but I
> may need some substantial pointers.
This would certainly be a good project to learn about socket
programming and http. ;-)
OTOH, if you use a purpose designed utility to pull the required files
off the web then a lot of the work will already be done for you, and
you know that it is already tested and debugged.
There is a dos port of the utility `wget' that will do what you want,
and a whole lot more.
You could use wget from a batch file in dos, a bash script, or even
call it from your own C code with system(). I have used *a* dos port
of wget, called from a bash script in djgpp, with much success.
A web search turned up http://www.rahul.net/dkaufman/ Sorry, I don't
know if this is the same dos port as I used.
I believe there is also a demo program with libsocket called httpget
that might suit, I have not used this.
- Raw text -