MasterX Posted July 1, 2008 Posted July 1, 2008 (edited) I tried to upload a file to my ftp server. #include<FTP.au3> $server = 'ftp.tixter.ti.funpic.de' $username = 'tixter' $pass = '******; its the correct passport' $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'C:\WINDOWS\Notepad.exe', '/somedir/Example.exe') $Ftpc = _FTPClose($Open) But there isn´t any file on my server It seems that there is a connection error. Func _FTPConnect($l_InternetSession, $s_ServerName, $s_Username, $s_Password, $i_ServerPort = 21, $l_Service = 1, $l_Flags = 0, $l_Context = 0) Local $ai_InternetConnect = DllCall('wininet.dll', 'long', 'InternetConnect', 'long', $l_InternetSession, 'str', $s_ServerName, 'int', $i_ServerPort, 'str', $s_Username, 'str', $s_Password, 'long', $l_Service, 'long', $l_Flags, 'long', $l_Context) If @error OR $ai_InternetConnect[0] = 0 Then SetError(-1) [color="#FF0000"]MsgBox(0,"","errorConnect")[/color] Return 0 Return $ai_InternetConnect[0] endif EndFunc;==> _FTPConnect Theres alway the msgbox. Edited July 1, 2008 by MasterX
d4rk Posted July 1, 2008 Posted July 1, 2008 I recomment adding Dllcall("wininet.dll") [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys
ProgAndy Posted July 1, 2008 Posted July 1, 2008 Or use this FTP.au3 http://www.autoit.de/index.php?page=Thread&postID=48404 *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
MasterX Posted July 1, 2008 Author Posted July 1, 2008 Or use this FTP.au3 http://www.autoit.de/index.php?page=Thread&postID=48404Thx ProgAndy now it works fine
ProgAndy Posted July 1, 2008 Posted July 1, 2008 Or use this FTP.au3 http://www.autoit.de/index.php?page=Thread&postID=48404I tested this UDF with my Funpic-Account, and it worked? //OK, you have to create the dir first! $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) _FTPMakeDir($Conn,"/somedir") $Ftpp = _FtpPutFile($Conn, 'C:\WINDOWS\Notepad.exe', '/somedir/Example.exe') MsgBox(0, '', @error) $Ftpc = _FTPClose($Open) *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now