Guest User

Untitled

a guest
Jan 23rd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. include('./Net/SFTP.php');
  2. $sftp = new Net_SFTP("server", 2022);
  3. if (!$sftp->login('username', 'password')) {
  4. exit("Login error");
  5. }
  6. $size = $sftp->size('./file.txt');
  7. $Container = nl2br($sftp->get('./file.txt', false, $size - 5000));
  8. if( !empty($Container) ) {
  9. echo $Container;
  10. } else {
  11. exit("empty file");
  12. }
Add Comment
Please, Sign In to add comment