Jump to content

PHP SFTP Transfers


newbreed65

Recommended Posts

Hi

 

I am currently trying to transfer a file from my server to another one via SFTP and I’m not having any luck at all. it just keeps failing to connect although I know the ftp detail are correct since I can connect it via core ftp, can anyone help me with SFTP transfers?

here is my current code

 


    $ftp_id       = ftp_ssl_connect($ftp_server) or die ('Cant Connect');
    $login_result = ftp_login($ftp_id, $ftp_user_name, $ftp_user_pass)or die ('Cant login');
    $upload       = ftp_put($ftp_id, $ftp_path . $file_name, $file_path,
$mode)or die ('upload dint work');
    ftp_close($ftp_id);


Link to comment
https://forums.phpfreaks.com/topic/164375-php-sftp-transfers/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.