WSAStartup(makeword(1,1),info); sHwnd:=Socket(AF_INET, SOCK_STREAM, 0); sin.sin_family:=AF_INET; sin.sin_port:=htons(dport); sin.sin_addr.S_addr:=inet_addr(dhost); connect(sHwnd, sin, sizeof(sin)); sbuff1 := ''; sbuff1 := 'GET ' + dpath + '? HTTP/1.1'+ #13#10 + 'Host: ' + dhost + #13#10#13#10; CopyMemory(@sBuff,pchar(sBuff1),length(sBuff1)); send(sHwnd, sBuff, Length(sBuff), 0); recv(sHwnd, rBuff, Length(rBuff), 0); fileText := copy(rBuff, pos(#13#10#13#10, rBuff)+4, length(rBuff)-pos(#13#10#13#10, rBuff)); SaveFile(SavePath, fileText);