www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/03/18:45:16

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Can I query the WWW from a DJGPP program?
Date: Fri, 03 Nov 2000 23:32:41 +0000
Organization: Customer of Energis Squared
Lines: 31
Message-ID: <d6h60tc51lk88fn2fe5hlgklbqonbokqip@4ax.com>
References: <8tu6jd$7o9$1 AT news DOT stortek DOT com> <9ld50t0bdc1j4447j7jc73k76u0pq3dg8g AT 4ax DOT com> <qbFM5.9131$mv2 DOT 29116 AT news2-win DOT server DOT ntlworld DOT com>
NNTP-Posting-Host: modem-60.connecticut.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: news5.svr.pol.co.uk 973294353 25379 62.137.58.60 (3 Nov 2000 23:32:33 GMT)
NNTP-Posting-Date: 3 Nov 2000 23:32:33 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Agent 1.7/32.534
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019