sftp file transfer using php #sftp transfer
Edit
by Bob Squires - 6 years ago (2018-11-24)
I want to find a php package that will perform secure FTP (sftp)
| I want to transfer files from my local computer to a unix-based remote ftp server that requires secure transfer. |
- 1 Clarification request
1.
by Max Base - 6 years ago (2019-02-25) Reply
Hello,
Do you want to upload or download a file?
Or create,remove file and directory?
Ask clarification
1 Recommendation
PHP SFTP Library: Access FTP and SFTP servers to transfer files
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.
| by Muhammad Umer Farooq package author 135 - 6 years ago (2018-12-01) Comment
You can use this class to access sftp
like that
//creating the connection
$ftp = new FTP('sftp.myserver.com', 'username', 'password',true);
//then upload files
//$ftp->put(array $files , $folder);
//Default $folder is public_html
$ftp->put(['login.php','signup.php'],'htdocs'); |