всем привет,помогите кто может подправить код..заранее спасибо
что бы можно было закачать файл или скопировать к себе на комп.
Код:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | function LoadPrice( const URL, FileName: String ; Http: TIdHTTP): Boolean ;
var
tmpStream : TFileStream;
begin
tmpStream := TFileStream . Create(FileName, fmCreate);
try
Http . Get(URL, tmpStream);
tmpStream . Free;
except
On E: Exception do
begin
if E . ClassName = 'EIdSocketError' then
MessageText := 'Неверно указан порт или IP соединения'
else if E . ClassName = 'EIdProtocolReplyError' then
MessageText := 'Неправильный логин/пароль' ;
Result := MessageError(MessageText);
tmpStream . Free;
DeleteFile( PChar (FileName));
end ;
end ;
end ;
|
Admin: Пользуемся тегами!