This function returns the state of any FTP session. FtpGetState(n) is mainly used to determine if the FTP connection was made successfully.
The following values are returned by this function:
States 2 and 3 occur directly after an FtpOpen command and require a FtpClose to clear.