定制 direte/microftps 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

direte/microftps

Composer 安装命令:

composer require direte/microftps

包简介

Micro library to deal with FTPS connections over cUrl

README 文档

README

Micro library to deal with FTPS connections over cUrl

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

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)

  • read($filepath)

  • listDir($filepath)

  • write($remoteFilename, $localFilename)

  • delete($filepath)

Contribution

PRs are welcome

License

MIT

统计信息

  • 总下载量: 571
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-20