My problem was that I wasn't accounting for the headers, I was reading the header, and no more. I've solved that now.
I succesfuly downloaded a 1.3mb pdf file. however when I try to get a file on my website http://www.geocities.com/andrew_parlane2000/penguin.gif I send:
GET /andrew_parlane2000/penguin.gif HOST: www.geocities.com Connection: close
I get no response. my recv times out after about 30 secconds, returning -1. I know this file exists, and I got the url correct, because I copied it directly from IE. Even if it was wrong, It should have responded with http/1.1 404 File Not found.
This has happened with a few files. The servers arn't down, because I can get the files in IE.
I am not sure what I can do about it.
www.stickskate.com -> check it out, some gnarly stick skating movies
OK, I havn't solved the problem yet, but here is aother question anyway?I try running this on a computer network, with a proxy, the connect statement times out. I think its the proxy, so does anyone know how I can connect through a proxy?
www.stickskate.com -> check it out, some gnarly stick skating movies
You have to connect to the computer with the proxy and then ask it for the webpage using the HOST: line.
It's been a while sense i've done this, but I'll take a shot. Let's say the proxy is on 192.168.0.5, port 80, and you want google:
connect 192.168.0.5:80 send-
GET / HTTP/1.1 Host: google.com Connection: <whatever>
Then you will recieve the information from the proxy, rather than from the actual website. In other words, the proxy is middle-man. This is for HTTP proxy, I believe, not sure about SOCKS. If i'm wrong please go ahead in correct me, like i said, havent done this in a bit, but I hope i helped.