Full OO Ftp library for php

I tried to create an application that will download files from different ftp servers to a local directory. Later I uploaded them to other ftp servers.

The application is built using the Zend framework.

The fact is, I can’t find a class for handling ftp load / unload functions within Zend.

The only class available is Zend_File_Transfer , which has the following comment:

Note: restriction

The current implementation of Zend_File_Transfer is limited to downloading HTTP messages. Other adapters that support booting and other protocols will be added in future releases. Unrealized methods will throw an exception. For now, you should use Zend_File_Transfer_Adapter_Http directly. Once multiple adapters are available, you can use a common interface.

I need to do the following:

  • Download multiple files.
  • Get a list of deleted directories of all files.
  • Install validators
  • Set filters
  • Set paths
  • Rename Files
  • Download Wrap
  • Exceptions for various errors during operation.

Is there a solution to this problem within Zend? Could you recommend an alternative library for ftp operations?

Thanks in advance

UPDATE:

  • I checked the PEAR package and, unfortunately, is still in alpha release. Moreover, their functions return no exception errors as soon as a problem occurs, for example, a boot failure or a remote path.
  • Unfortunately, Skjb_Ftp is not complete, as many functions do not have an implementation.
+4
source share
3 answers

Check out this php5 flash shell for FTP built-in functions: https://github.com/dg/ftp-php has some exception handling tools you could use.

+5
source

Here is a great library for it: https://github.com/Nicolab/php-ftp-client

+1
source

There is a suggestion for Zend_Ftp that you could use. Otherwise, Skjb_Ftp .

I cannot vouch for the completeness or reliability of any of these solutions, since I have not used them either, but this must be something that you would start. Some features that you require are not available, but adding them using FTP functions should not be too difficult.

0
source

Source: https://habr.com/ru/post/1399963/


All Articles