Código
function DownloadFile(Source, Dest: string): Boolean;
begin
try
Result:= UrlDownloadToFile(nil, PChar(source),PChar(Dest), 0, nil) = 0;
except
Result:= False;
end;
end;
{Para usar esta function é preciso declarar Urlmon na seção uses da unit. Depois basta fazer uma chamada padrão:}
if DownloadFile ('http://www.onde.com/arq.htm','c:arq.htm') then
ShowMessage('Download Concluído.');
{att. Lucafss}
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009