PHP Classes

PHP SFTP Library: Access FTP and SFTP servers to transfer files

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 362 This week: 1All time: 6,885 This week: 560Up
Version License PHP version Categories
php-ftp-class 1.0.2MIT/X Consortium ...5Networking, PHP 5, Files and Folders
Description 

Author

This class can access FTP servers to transfer files.

It can connect to a given FTP server using a given user name and password and can perform several types of operations with files and directories. Currently it can:

- Get the list of files of the current directory.
- Get the current directory.
- Change the current directory to a given path.
- Create one or more server directories recursively with a given path.
- Check if a given file or a directory exists.
- Download a file to a local directory with a given path name.
- Rename a given file.
- Change permissions of a given file.
- Delete a given file.
- Upload a list of local files to the server.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq is available for providing paid consulting. Contact Muhammad Umer Farooq .
Classes: 52 packages by
Country: Pakistan Pakistan
Age: 22
All time rank: 84611 in Pakistan Pakistan
Week rank: 51 Up3 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x

Recommendations

sftp file transfer using php
I want to find a php package that will perform secure FTP (sftp)

Example

<?php
require_once 'classes/FTP.php';

$ftp = new FTP('ftp.myserver.com', 'username', 'password',false);

$ftp->mkdir('somedir');
$ftp->chdir('somedir');



Details

PHP-FTP-Class

PHP FTP is a simple and convenient FTP adapter for processing FTP requests via PHP.

BASIC USAGE

Create a new directory, change into it and upload a file

$ftp = new FTP('ftp.myserver.com', 'username', 'password',false);

$ftp->mkdir('somedir');
$ftp->chdir('somedir');

$ftp->put(['my_local_file.html','my_local_file2.html']);

Download file from a directory

$ftp = new FTP('ftp.myserver.com', 'username', 'password',false);

$ftp->chdir('somedir');

$ftp->get('my_local_file.html', 'file_on_server.html');


  Files folder image Files  
File Role Description
Files folder imageclasses (1 file)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file readme.md Doc. Documentation

  Files folder image Files  /  classes  
File Role Description
  Plain text file Ftp.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:362
This week:1
All time:6,885
This week:560Up