PHP Code | Connect to remote SFTP location on Windows

| By 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