PHP Code | Connect to remote SFTP location on Windows

Author - Webner

We need to use the phpseclib library to connect to SFTP server:

$sftp = new Net_SFTP('www.webnersolutions.com');
if (!$sftp->login('user_name', 'password'))
   {
   exit('Login Failed');
    }
$this->downloadfiles($sftp->nlist());
//to download all files on remote root folder
Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Comments are closed.