Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ftpconnect(3) [debian man page]

FtpConnect(3)						     Library Functions Manual						     FtpConnect(3)

NAME
FtpConnect - Connect to an FTP server. SYNOPSIS
#include <ftplib.h> int FtpConnect(const char *host, netbuf **nControl); PARAMETERS
host The name of the host machine to connect to and optionally an alternate port number to use. nControl The address where the pointer to the newly created control handle should be stored. DESCRIPTION
FtpConnect() establishes a connection to the FTP server on the specified machine and returns a handle which can be used to initiate data transfers. The host name should be specified as or :.may be either a host name or ip address. may be either a service name or a port num- ber. RETURN VALUE
If the connection to the remote server if successful, FtpConnect() returns 1. Otherwise, 0 is returned. FTPlib 26 November 1997 FtpConnect(3)

Check Out this Related Man Page

FTP_SSL_CONNECT(3)							 1							FTP_SSL_CONNECT(3)

ftp_ssl_connect - Opens an Secure SSL-FTP connection

SYNOPSIS
resource ftp_ssl_connect (string $host, [int $port = 21], [int $timeout = 90]) DESCRIPTION
ftp_ssl_connect(3) opens an explicit SSL-FTP connection to the specified $host. Note Why this function may not exist ftp_ssl_connect(3) is only available if both the ftp module and the OpenSSL support is built statically into php, this means that on Windows this function will be undefined in the official PHP builds. To make this function available on Windows you must compile your own PHP binaries. Note ftp_ssl_connect(3) is not intended for use with sFTP. To use sFTP with PHP, please see ssh2_sftp(3). PARAMETERS
o $host - The FTP server address. This parameter shouldn't have any trailing slashes and shouldn't be prefixed with ftp://. o $port - This parameter specifies an alternate port to connect to. If it is omitted or set to zero, then the default FTP port, 21, will be used. o $timeout - This parameter specifies the timeout for all subsequent network operations. If omitted, the default value is 90 seconds. The timeout can be changed and queried at any time with ftp_set_option(3) and ftp_get_option(3). RETURN VALUES
Returns a SSL-FTP stream on success or FALSE on error. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.2.2 | | | | | | | The function was changed to return FALSE when it | | | can't use an SSL connection, instead of fallback- | | | ing to a non-SSL one as previously. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 ftp_ssl_connect(3) example <?php // set up basic ssl connection $conn_id = ftp_ssl_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); echo ftp_pwd($conn_id); // / // close the ssl connection ftp_close($conn_id); ?> SEE ALSO
ftp_connect(3). PHP Documentation Group FTP_SSL_CONNECT(3)
Man Page

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

bash script - sftpbatchfile - stop on failure

Hello all, I am currently writing a script to send files to a server over sftp. When the sftp put command succeeds it wil preform a local move from within the sftp shell to another folder (this is done so when the script is rerun no doubles will be sent). therefore i had following sollution ... (32 Replies)
Discussion started by: Kerberos
32 Replies

2. Shell Programming and Scripting

Listing Files and Sizes on FTP server

Need assistance in getting File size for the List of files using perl script . I have writtern 2 codes. One of them gives me the list of files and 2nd one give me the size for only 1 file. I dont know how to club both of them to get the list of files with its size . #!/usr/bin/perl -w... (11 Replies)
Discussion started by: ajayram_arya
11 Replies

3. Shell Programming and Scripting

Connect to FTP find files and export them to another server

Hi I'm trying to make script that will connect to FTP Server than find files that contain word HIGH in name and than export them to another server. Can anyone tell me if something like this is possible? Thanks :) (7 Replies)
Discussion started by: steve87bg
7 Replies

4. Shell Programming and Scripting

Newbie needs help with some bash scripting

Please bear with me, I'm a beginner but have had some experience and decent knowledge to understand things as I read them and I'm in the process of trying to learn more. I recently inherited a UNIX server which has a bash script which is part of a crontab schedule that needs to be modified (or... (3 Replies)
Discussion started by: Danylko
3 Replies