Chilkat HOME ASP Visual Basic VB.NET C# C C++ MFC Delphi FoxPro Java Perl Python Ruby SQL Server VBScript
Active and Passive Modes in FTPThe Passive property controls whether data connections for uploads/downloads are established in Active or Passive mode. To use Active mode, set the Passive property = 0. This is the default. To use Passive mode, set the Passive property = 1.
About Passive/Active Modes:
Active Mode:
Passive Mode:
<?php $ftp = new COM("Chilkat.Ftp2"); // Any string unlocks the component for the 1st 30-days. $success = $ftp->UnlockComponent('Anything for 30-day trial'); if ($success != true) { print $ftp->lastErrorText() . "\n"; exit; } $ftp->Hostname = 'ftp.secureftp-test.com'; $ftp->Username = 'test'; $ftp->Password = 'test'; // Connect and login to the FTP server. $success = $ftp->Connect(); if ($success != true) { print $ftp->lastErrorText() . "\n"; exit; } // To use Passive mode: $ftp->Passive = true; // or... // To use Active mode: $ftp->Passive = false; // ... ?> |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.