Ticket #2770: _FTP_Connect.txt

File _FTP_Connect.txt, 2.0 KB (added by mLipok, 10 years ago)
Line 
1###User Defined Function###
2_FTP_Connect
3
4###Description###
5Connects to an FTP server
6
7###Syntax###
8#include <FTPEx.au3>
9_FTP_Connect ( $hInternetSession, $sServerName, $sUsername, $sPassword [, $iPassive = 0 [, $iServerPort = 0 [, $iService = $INTERNET_SERVICE_FTP [, $iFlags = 0 [, $iContext = 0]]]]] )
10
11
12###Parameters###
13@@ParamTable@@
14$hInternetSession
15        as returned by <a href="_FTP_Open.htm">_FTP_Open()</a>
16$sServerName
17        Server name/ip.
18$sUsername
19        Username.
20$sPassword
21        Password.
22$iPassive
23        [optional] Passive mode.
24$iServerPort
25        [optional] Server port ( 0 is default (21) )
26$iService
27        [optional] This can be one of the following constant values:
28                $INTERNET_SERVICE_FTP - FTP service.
29                $INTERNET_SERVICE_GOPHER - Gopher service. Available only on Windows XP, Windows Server 2003 R2 or earlier.
30                $INTERNET_SERVICE_HTTP - HTTP service.
31$iFlags
32        [optional] Special flags.
33                $INTERNET_FLAG_PASSIVE
34                $INTERNET_FLAG_TRANSFER_ASCII
35                $INTERNET_FLAG_TRANSFER_BINARY
36$iContext
37        [optional] A variable that contains the application-defined value that associates this search with any application data.
38        This is only used if the application has already called <a href="_FTP_SetStatusCallback.htm">_FTP_SetStatusCallback()</a> to set up a status callback function.
39@@End@@
40
41###ReturnValue###
42@@ReturnTable@@
43Success:        an handle to connected session.
44Failure:        0 and sets the @error flag to non-zero.
45@@End@@
46
47
48###Remarks###
49$INTERNET_* constants require #include <FTPEx.au3>
50The return handle must be closed with <a href="_FTP_Close.htm">_FTP_Close()</a>.
51
52
53###Related###
54_FTP_Close, _FTP_Command, _FTP_DirCreate, _FTP_DirDelete, _FTP_DirGetCurrent, _FTP_DirPutContents, _FTP_DirSetCurrent, _FTP_FileDelete, _FTP_FileGet, _FTP_FileGetSize, _FTP_FilePut, _FTP_FileRename, _FTP_ListToArray, _FTP_ListToArray2D, _FTP_ListToArrayEx, _FTP_Open, _FTP_SetStatusCallback
55
56
57###See Also###
58@@MsdnLink@@ InternetConnect
59
60
61###Example###
62@@IncludeExample@@