2017 © Pedro Peláez
 

library microftps

Micro library to deal with FTPS connections over cUrl

image

direte/microftps

Micro library to deal with FTPS connections over cUrl

  • Friday, October 21, 2016
  • by direte
  • Repository
  • 3 Watchers
  • 3 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

MicroFtps

Micro library to deal with FTPS connections over cUrl, (*1)

Why?

  • Old 'non-upgradable' customer server
  • Common data_accept: SSL/TLS handshake failed error with the default explicit ftp_ssl_connect
  • Required a quick solution

Solution

Raw FTPS (not SFTP) connection over cUrl, (*2)

Usage

$someOpts = array(
  'passive' => true,
  'port' => 990,
  'timeout' => 10,
  'curlOptions' => array(
    'CURLOPT_SSL_VERIFYPEER' => true
  )
);

$mf = new \DiRete\MicroFtps();
$mf->connect('ftps.server.com', 'username', 'pass', $someOpts);
// Or $mf = new \DiRete\MicroFtps('ftps.server.com', 'username', 'pass', $someOpts);
$fileContent = $mf->read('/path/to/my/file.txt');

API (quick overview)

  • connect($server, $username, $password, $options), (*3)

  • read($filepath), (*4)

  • listDir($filepath), (*5)

  • write($remoteFilename, $localFilename), (*6)

  • delete($filepath), (*7)

Contribution

PRs are welcome, (*8)

License

MIT, (*9)

The Versions

21/10 2016

dev-master

9999999-dev https://github.com/direte/microftps

Micro library to deal with FTPS connections over cUrl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Artur Arseniev

file sftp ftp ssl ssl-ftp