Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.03.19;
Скачать: CL | DM;

Вниз

Want a simple KOLFTP example   Найти похожие ветки 

 
lundeholm   (2005-07-20 02:52) [0]

Hi!

I tried KolFTP today. I couldn't get it to work. This is my code:


program Project2;

{$APPTYPE CONSOLE}

uses
 kol,kolftp,windows;

var FTP:TKOLFTP;
begin
 FTP:= NewKOLFtpClient;

 FTP.HostAddr:='ftp.home.no';
 FTP.UserName:='filipsprogram';
 FTP.UserPass:='password';

 FTP.Connect;
 FTP.Login;

 FTP.Put('c:\arrow.bmp');

 FTP.Close;
 FTP.Free

end.


I want to upload c:\arrow.bmp but this fails. What am I doing wrong?


 
Dodfr   (2005-07-20 11:46) [1]

are you NATed behind a proxy/firewall ? if yes, you cannot do FTP wihtout PASSIVE mode.


 
lundeholm   (2005-07-20 14:26) [2]

Thanks for your reply Dodfr.

My firewall pops up when executing the program but I click "Yes, allow this connection" in the box, so that should not be the problem. I don't know much about this stuff, so my guess is that my code is wrong. I tried changing to passive mode, but it didn't work.


 
Thaddy   (2005-07-20 14:46) [3]

You could try and use my kolsimpleftp with the INTERNET_MODE_PASSIVE flag in the internetconnect call.
kolsimpleftp uses the wininet api, just like ftp.exe that comes with the operating system.


 
lundeholm   (2005-07-20 21:01) [4]

Thaddy, your component worked fine. Thanks.



Страницы: 1 вся ветка

Текущий архив: 2006.03.19;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.045 c
2-1141062648
redlord
2006-02-27 20:50
2006.03.19
message+ Tthread


2-1141445077
anubis
2006-03-04 07:04
2006.03.19
Как заполнять таблицу програмным путём


15-1139828884
Megabyte
2006-02-13 14:08
2006.03.19
Тема работы в аспирантуре


15-1140547040
DillerXX
2006-02-21 21:37
2006.03.19
Variants без Types и SysUtils


3-1138112255
HabarovSergey
2006-01-24 17:17
2006.03.19
ошибка сохранения записи(данные модифицированы).Как игнорировать?