2017 © Pedro PelĂĄez
 

library ftp

A simple object wrapper around native ftp_* functions.

image

lc5/ftp

A simple object wrapper around native ftp_* functions.

  • Saturday, January 2, 2016
  • by Lc5
  • Repository
  • 1 Watchers
  • 1 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Ftp Build Status

A simple object wrapper around native ftp_* functions. Fully unit-tested., (*1)

Installation

Use Composer to install the package:, (*2)

$ composer require lc5/ftp

Usage

use Lc5\Ftp\Ftp;

try {
    $ftp = new Ftp('ftp.example.com', 'username', 'password');

    //Save remote.txt to local.txt
    $ftp->get('local.txt', 'remote.txt', FTP_ASCII);

    //Actually you don't have to explicitly call close()
    //It will get called automatically as a part of the __destruct() method
    $ftp->close();

    //For anonymous login you only need to pass the host address
    $ftp = new Ftp('ftp.example.com');
    $ftp->pasv(true);

    //Get list of files in current directory and print them
    $files = $ftp->rawlist('.');

    foreach ($files as $file) {
        echo $file . PHP_EOL;
    }
} catch (\Exception $e) {
    echo $e->getMessage();
}

Extending

use Lc5\Ftp\Ftp;

class MyFtp extends Ftp
{
    public function myFunction()
    {
        $connection = $this->connect();

        //your custom code...
    }
}

The Versions

02/01 2016

1.1.1

1.1.1.0 https://github.com/Lc5/Ftp

A simple object wrapper around native ftp_* functions.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Ɓukasz Krzyszczak

ftp

02/01 2016

dev-master

9999999-dev https://github.com/Lc5/Ftp

A simple object wrapper around native ftp_* functions.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Ɓukasz Krzyszczak

ftp

29/10 2015

1.1.0

1.1.0.0 https://github.com/Lc5/Ftp

A simple object wrapper around native ftp_* functions.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Ɓukasz Krzyszczak

ftp

25/11 2014

1.0.0

1.0.0.0 https://github.com/Lc5/Ftp

A simple object wrapper around native ftp_* functions.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Ɓukasz Krzyszczak

ftp