CreateFTPConnection (open)

This function will try to login to an ftp server

Syntax

LOADLIB "wh::internet/ftp.whlib";

INTEGER FUNCTION CreateFTPConnection(STRING serverip, INTEGER serverport, STRING username, STRING passwd, BOOLEAN passive, INTEGER securitylevel)

Parameters

STRING serverip

String containing the ip of the ftp server

INTEGER serverport

Integer of the port of the ftp server

STRING username

String of the username to connect with

STRING passwd

String of the password to use

BOOLEAN passive

Data connection type

INTEGER securitylevel

Security level (0: no secure connection, 1: secure command channel if available, 2: secure command channel only)

Return value

INTEGER

Integer with the connectionid (if < 0 an error occurred) Return value -1 = Failed to create a socket Return value -2 = Failed to connect to the server Return value -3 = Failed to receive welcome message Return value -4 = Wrong username Return value -5 = Wrong password