From: | Paul Burkey |
Date: | 5 Sep 99 at 23:07:19 |
Subject: | Re: HTTP access |
James L Boyd wrote:
> uses the HTTP 1.0 protocol, whereas most ISP use 1.1, so I'm guessing
> this is why it isn't working (?). I'm using Paul Burkey's latest
> TCPFuncs file as the includes, and everything seems to be working,
> just that, like I said, all files contain "Sorry...not found..."
>
> Does anyone have any docs on what command I should be sending to
> a server to download a file? From what I can tell, this sends
> something like "GET http://www.blahblah.com.index.html"...
>
> I'm assuming that's the problem, and not the TCPfuncs stuff...
I recently coded a program that grabs and compiles the latest share
prices from www.financialmail.co.uk in C++ and it was a bit fiddly
trying to conform to the HTTP protocol. I had to play about with
the <CR><LF> chars (chr$(10) and chr$(13)) until I managed to
get the pages i was after but basicly it goes something like this:
Replace <CR> and <LF> with the carrage return and line feed chars
or perhaps you`re using the version of TCPFuncs with the CRLF bit
built in.
connect to the site at port 80 (you've done this already)
send string to server "GET /path/to/page.html HTTP/1.0<CR><LF>"
send string to server "From: your@email.addy<CR><LF>"
send string to server "User-Agent: YourAppName<CR><LF>"
send string to server "<CR><LF>"
now grab the incomming data.
I didn't used http:// in my GET string! Perhaps this could be where
your problem is. I'm also not sure if the From: and User-Agent:
strings are important. As I said, it was a bit fiddly getting it
to work so I added these lines. When it started working I didn`t
dare remove them! :)
Cheers,
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie