User Tools

Site Tools


uphp:functions:ftp_open

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

uphp:functions:ftp_open [2019/06/28 04:16]
admin created
uphp:functions:ftp_open [2021/09/13 05:57]
Line 1: Line 1:
-======ftp_open====== 
- 
-<badge>WM-MINI2, WM-MEGA FW >= 2.1137</badge> <badge>WM-M2 FW >= 3.1137</badge> 
- 
-Open a connection to an FTP server 
- 
-====Description==== 
- 
-<well size="sm"><html> 
-<span style="font-size:125%;color:green">int 
-<span style="color:black">ftp_open ( 
-<span style="color:green">string 
-<span style="color:blue">$host 
-<span style="color:black">, 
-<span style="color:green">int 
-<span style="color:blue">$port 
-<span style="color:black">, 
-<span style="color:green">string 
-<span style="color:blue">$username 
-<span style="color:black">, 
-<span style="color:green">string 
-<span style="color:blue">$password 
-<span style="color:black">) 
-</html></well> 
- 
-Connect to the server and return the response code. 
- 
-====Parameters==== 
- 
-<html><b><span style="color:blue">$host<span style="color:black"></b>:  <b><span style="color:green">String<span style="color:black"></b> containing the host name or IP address of teh FTP server</html> 
- 
-<html><b><span style="color:blue">$port<span style="color:black"></b>:  <b><span style="color:green">Int<span style="color:black"></b> FTP port number</html> 
- 
-<html><b><span style="color:blue">$username<span style="color:black"></b>:  <b><span style="color:green">String<span style="color:black"></b> containing the FTP username</html> 
- 
-<html><b><span style="color:blue">$password<span style="color:black"></b>:  <b><span style="color:green">String<span style="color:black"></b> containing the FTP password</html> 
- 
-====Return Values==== 
- 
-<html><b><span style="color:green">int<span style="color:black"></b></html>:  Returns 1 if FTP connection was successful and 0 if it failed. 
- 
-====Example==== 
- 
-<code php> 
-<? 
- $res = ftp_open("ftp.myserver.com",21,"myuser","mypassword"); 
- if ($res) { 
- print("connected to FTP server!!"); 
- ftp_close(); 
- } 
-?> 
-</code> 
- 
-====See Also==== 
- 
-[[ftp_close()]] - Close an FTP connection 
- 
  
uphp/functions/ftp_open.txt · Last modified: 2021/09/13 05:57 (external edit)