note 37331 added to function.ftp-connect

From: Date: Tue, 11 Nov 2003 08:07:44 +0000
Subject: note 37331 added to function.ftp-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-60225@lists.php.net to get a copy of this message
Connecting through a firewall also depends on the type. This is an example for the Secure Gateway FTP. First you have to connect to the firewall, then open a session to the destination ftp server. This looks like this: // Connect to firewall $conn_id = ftp_connect("firewall.yournet.com"); // Open a session to an external ftp site $login_result = ftp_login ($conn_id, "userid@externalhost.com", "password"); // Check open if ((!$conn_id) || (!$login_result)) { echo "Ftp-connect failed!"; die; } else { echo "Connected."; } // turn on passive mode transfers ftp_pasv ($conn_id, true) ; ... and go on ... ---- Manual Page -- http://www.php.net/manual/en/function.ftp-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37331 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37331&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37331&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#60225) next »