Kurde wininet daje te same rezultaty:
procedure TForm1.Button1Click(Sender: TObject);
const BufferSize = 1024;
var FileOnNet, LocalFileName : String;
hSession, hURL: HInternet;
Buffer: array[1..BufferSize] of Byte;
BufferLen: DWORD;
f: File;
sAppName: string;
begin
FileOnNet := 'http://www.ge0dezja.prv.pl/files/geomax/version.ini';
LocalFileName:='d:\version.ini';
sAppName := ExtractFileName(Application.ExeName);
hSession := InternetOpen(PChar(sAppName),INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
try
hURL := InternetOpenURL(hSession, PChar(fileonnet), nil,0,0,0);
try
AssignFile(f,localFileName);
Rewrite(f,1);
repeat
InternetReadFile(hURL, @Buffer,
SizeOf(Buffer), BufferLen);
BlockWrite(f, Buffer, BufferLen)
until BufferLen = 0;
CloseFile(f);
finally
InternetCloseHandle(hURL)
end
finally
InternetCloseHandle(hSession)
end
end;
i sciaga mi sie to samo:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<title>Geodezja, programowanie, CAD</title><meta name="robots" content="ALL">
<meta http-equiv="http-equiv" name="pragma" content="no-cache">
<meta name="description" content="Strona traktuje o zagadnieniach geodezyjnych, programowaniu (Delphi, Pascal, Basic), pakietach CAD (MicroStation, AutoCAD) oraz innych rzeczach zwi±zanych z informatyk±.">
<meta name="author" content="">
<meta name="keywords" content="ge0dezja, geodezja, Delphi, MicroStation">
</head>
<frameset framespacing="0" border="0" frameborder="0" rows="100%,*" noresize="noresize">
<frame name="q12sdae44" noresize="noresize" src="http://www.ge0dezja.republika.pl//files/geomax/version.ini"></frameset>
</html>