Guest User

Untitled

a guest
Aug 24th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. How to download a file from SFTP using PHP?
  2. <?php
  3. $strServer = "pass.com";
  4. $strServerPort = "22";
  5. $strServerUsername = "admin";
  6. $strServerPassword = "password";
  7. $resConnection = ssh2_connect($strServer, $strServerPort);
  8. if(ssh2_auth_password($resConnection, $strServerUsername, $strServerPassword)) {
  9. $resSFTP = ssh2_sftp($resConnection);
  10. echo "success";
  11. }
  12. ?>
Add Comment
Please, Sign In to add comment