[ byTer @ 14.10.2004. 23:29 ] @
Ja sam do skora imao neku rutinu ali sam je izbrisao. Poku[avam da se akacim na port 80 servera i skinem root datoteku. Ko zna neka pomaze izgubio sam ceo dan juce. Pozdrav. |
[ byTer @ 14.10.2004. 23:29 ] @
[ reiser @ 14.10.2004. 23:56 ] @
Code: function DownloadFile(const fileURL, FileName : String) : Boolean; const BufferSize = 1024; var hSession, hURL : HInternet; Buffer : Array[1..BufferSize] of Byte; BufferLen : DWORD; f : File; sAppName : String; begin sAppName := ExtractFileName(ParamStr(0)); hSession := InternetOpen(PChar(sAppName), INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0); Try hURL := InternetOpenURL(hSession, PChar(fileURL), nil, 0, 0, 0); Try AssignFile(f, FileName); Rewrite(f, 1); repeat InternetReadFile(hURL, @Buffer, SizeOf(Buffer), BufferLen); BlockWrite(f, Buffer, BufferLen) until BufferLen = 0; CloseFile(f); result := TRUE; Finally InternetCloseHandle(hURL) End; Finally InternetCloseHandle(hSession) End; end; [ bancika @ 15.10.2004. 00:13 ] @
Lakse ti je sa Indy IdHTTP komponentom
mislim da je naredba tipa Code: s: string = IdHTTP1.Get('http://neki-sajt.co.yu/index.html'); probaj, ne znam iz glave tacno [ byTer @ 15.10.2004. 11:07 ] @
Hvala. To mi je bilo potrebno.
[ janez_kranjski @ 25.10.2004. 23:37 ] @
Na blockwrite javi grešku. Neče da piše u fajl. U čemu je problem?
[ reiser @ 25.10.2004. 23:43 ] @
Kod mene lepo radi... Vidi da FileName fajl ne koristi neki drugi proces dok ti pokusavas da pises u njega...
[ janez_kranjski @ 25.10.2004. 23:51 ] @
Hvala puno. Pokušat ču.
Copyright (C) 2001-2025 by www.elitesecurity.org. All rights reserved.
|