User Tools

Site Tools


uphp:functions:ftp_open

This is an old revision of the document!


ftp_open

WM-MINI2, WM-MEGA FW >= 2.1137 WM-M2 FW >= 3.1137

Open a connection to an FTP server

Description

int ftp_open ( string $host , int $port , string $username , string $password )

Connect to the server and return the response code.

Parameters

$host: String containing the host name or IP address of teh FTP server

$port: Int FTP port number

$username: String containing the FTP username

$password: String containing the FTP password

Return Values

int: Returns 1 if FTP connection was successful and 0 if it failed.

Example

<?
	$res = ftp_open("ftp.myserver.com",21,"myuser","mypassword");
	if ($res) {
		print("connected to FTP server!!");
		ftp_close();
	}
?>

See Also

ftp_close() - Close an FTP connection

uphp/functions/ftp_open.1561695363.txt.gz · Last modified: 2021/09/13 05:56 (external edit)