hi there,
have anybody have done any script to do ftp over ssh.
if yes i hope can quide me up on how to do it.
tq.
php script to do ftp over ssh
Moderator: General Moderators
ftp_ssl_connect
Try the PHP function ftp_ssl_connect and then the usual PHP ftp functions.
See http://au.php.net/manual/en/function.ft ... onnect.php for detail on using ftp_ssl_connect, and troubleshooting issues:
In particular, that OpenSSL support is enabled in PHP, and that you may need to compile a separate binary if using Windows.
Example use: extracted from the above link:
I trust this will assist you.
See http://au.php.net/manual/en/function.ft ... onnect.php for detail on using ftp_ssl_connect, and troubleshooting issues:
In particular, that OpenSSL support is enabled in PHP, and that you may need to compile a separate binary if using Windows.
Example use: extracted from the above link:
Code: Select all
<?php
// set up basic ssl connection
$conn_id = ftp_ssl_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
echo ftp_pwd($conn_id); // /
// close the ssl connection
ftp_close($conn_id);
?>