standard.net.ftp.FtpLogin

FtpLogin is available since version 1.0.

Prototype:

boolean FtpLogin(string username, string password[, number connection_handle])

Parameters

username
the username
password
the password
connection_handle
the connection handle as returned by FtpConnect. If this parameter is missing, the connection handle will be the last successfully opened handle.

Description:

Log in to remote server.

Return value:

Returns true if succeeded, false if failed.

Example
	function TestFtp() {
		var con=FtpConnect("ftp.rdsct.ro");
		if (!con) {
			echo "Can't Connect\n";
			return 0;
		} else {
			echo "Connected !!!\n";
		}
		FtpLogin("","",con);
		//if (!FtpGet("c:\\test.zip","/pub/PPPoE/win98/RASPPPOE_098B.ZIP",FTPLIB_IMAGE,con))
		//	echo "Error getting file\n";
		var ftpfile=FtpAccess("/pub/PPPoE/win98/RASPPPOE_098B.ZIP",FTPLIB_FILE_READ,FTPLIB_IMAGE,con);
		if (ftpfile) {
			echo "File opened !\n";
			echo FtpRead(1,ftpfile);
			FtpClose(ftpfile);
		}
		FtpQuit(con);
	}