2017 © Pedro Peláez
 

library simple-ftp

Simple FTP wrapper

image

damijanc/simple-ftp

Simple FTP wrapper

  • Friday, September 2, 2016
  • by damijanc
  • Repository
  • 2 Watchers
  • 7 Stars
  • 607 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

simple-ftp

Simple wrapper for PHP (http://php.net/manual/en/book.ftp.php) FTP, (*2)

Motivation for this class was to simplify usage of FTP so instead of doing:, (*3)

$conn = ftp_connect($host, $port, $timeout);
if ($conn) {
  $login_result = ftp_login($conn, $user, $password);
  if ($login_result) {
          $connected = TRUE;
  }
}

We simply do, (*4)

use damijanc\FTP\Client;

$ftp = new Client($options);
$ftp->connect();

In addition we can use shell commands like:, (*5)

cd  -change dir
put -upload a file
ls - list directory
get - download file

Example:, (*6)

use damijanc\FTP\Client;

$options = array;
$options['server'] = 'ftp.example.com';
$options['port'] = 21;
$options['user'] = 'user';
$options['pass'] = 'password';

//connect to server
$ftp = new Client($options);
$ftp->connect();
//got to folder
$ftp->cd('Folder1');
//upload file
$ftp->put('file1.zip');
//list content
$ftp->ls();
//end session
$ftp->disconnect();

Installation:, (*7)

composer require damijanc/simple-ftp

TODO:, (*8)

  • add multiple file/folder upload
  • add upload/download progress display
  • fix code comments
  • ...

The Versions

02/09 2016

dev-master

9999999-dev

Simple FTP wrapper

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4
  • ext-ftp *

 

The Development Requires

by Damijan Cavar

02/09 2016

1.0.3

1.0.3.0

Simple FTP wrapper

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4
  • ext-ftp *

 

The Development Requires

by Damijan Cavar

02/09 2016

1.0.2

1.0.2.0

Simple FTP wrapper

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4
  • ext-ftp *

 

The Development Requires

by Damijan Cavar

07/06 2015

1.0.1

1.0.1.0

Simple FTP wrapper

  Sources   Download

Apache2

The Requires

  • php >=5.4
  • ext-ftp *

 

The Development Requires

by Damijan Cavar