Concept Framework 2.0 documentation Contents | Index

standard.net.ftp.FtpConnect

Name Version Deprecated
FtpConnect version 1.0 no

Prototype:
number FtpConnect(string hostname)

Parameters:
hostname      the ftp server hostname; can contain the port. Eg. "localhost:21"

Description:
Connects to a given host.

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);
	}

Returns:
Returns null if the connection failed, or a connection handle if succeeded.

Documented by Eduard Suica, generation time: Fri Jan 21 18:06:22 2011 GMT(c)2011 RadGs Software