Архив метки: URLMon

Закачка и сохранение html странички в файл

[cc lang=»delphi» tab_size=»2″ line_numbers=»false» no_links=»false»] uses URLMon; function DownloadFile(SourceFile, DestFile: string): Boolean; begin try Result:=UrlDownloadToFile(nil,PChar(SourceFile),PChar(DestFile),0,nil)=0; except Result := False; end; end; procedure TForm1.Button1Click(Sender: TObject); begin DownloadFile(‘http://www.google.ru/’, ‘c:\1.txt’); end; end. [/cc]