Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include('./Net/SFTP.php');
- $sftp = new Net_SFTP("server", 2022);
- if (!$sftp->login('username', 'password')) {
- exit("Login error");
- }
- $size = $sftp->size('./file.txt');
- $Container = nl2br($sftp->get('./file.txt', false, $size - 5000));
- if( !empty($Container) ) {
- echo $Container;
- } else {
- exit("empty file");
- }
Add Comment
Please, Sign In to add comment