Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to download a file from SFTP using PHP?
- <?php
- $strServer = "pass.com";
- $strServerPort = "22";
- $strServerUsername = "admin";
- $strServerPassword = "password";
- $resConnection = ssh2_connect($strServer, $strServerPort);
- if(ssh2_auth_password($resConnection, $strServerUsername, $strServerPassword)) {
- $resSFTP = ssh2_sftp($resConnection);
- echo "success";
- }
- ?>
Add Comment
Please, Sign In to add comment