###User Defined Function###
_FTP_Connect

###Description###
Connects to an FTP server

###Syntax###
#include <FTPEx.au3>
_FTP_Connect ( $hInternetSession, $sServerName, $sUsername, $sPassword [, $iPassive = 0 [, $iServerPort = 0 [, $iService = $INTERNET_SERVICE_FTP [, $iFlags = 0 [, $iContext = 0]]]]] )


###Parameters###
@@ParamTable@@
$hInternetSession
	as returned by <a href="_FTP_Open.htm">_FTP_Open()</a>
$sServerName
	Server name/ip.
$sUsername
	Username.
$sPassword
	Password.
$iPassive
	[optional] Passive mode.
$iServerPort
	[optional] Server port ( 0 is default (21) )
$iService
	[optional] This can be one of the following constant values:
		$INTERNET_SERVICE_FTP - FTP service.
		$INTERNET_SERVICE_GOPHER - Gopher service. Available only on Windows XP, Windows Server 2003 R2 or earlier.
		$INTERNET_SERVICE_HTTP - HTTP service.
$iFlags
	[optional] Special flags.
		$INTERNET_FLAG_PASSIVE
		$INTERNET_FLAG_TRANSFER_ASCII
		$INTERNET_FLAG_TRANSFER_BINARY
$iContext
	[optional] A variable that contains the application-defined value that associates this search with any application data.
	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.
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	an handle to connected session.
Failure:	0 and sets the @error flag to non-zero.
@@End@@


###Remarks###
$INTERNET_* constants require #include <FTPEx.au3>
The return handle must be closed with <a href="_FTP_Close.htm">_FTP_Close()</a>.


###Related###
_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


###See Also###
@@MsdnLink@@ InternetConnect


###Example###
@@IncludeExample@@
