Hello Everybody,
i'm trying to upload a file with ftp and then i want the ssh or a function than when i upload a file to the server it will be copied to the directory with php. Is it possible?

My php function is:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>


<body>
<?php
$ftp_server=$_POST['smemo1.comm2000.it'];
$ftp_user_name=$_POST['logo'];
$ftp_user_pass=$_POST['su0n3r13'];
$source_file=$_FILES['file']['name'];// retrieve name of the file to be uploaded
$destination_file=$source_file;
// make a connection to the ftp server
$conn_id = ftp_connect($ftp_server);


// login with username and password
$login_result = ftp_login($conn_id , $ftp_user_name , $ftp_user_pass);


// check connection
if((!$conn_id)||(!$login_result)){
echo "FTP connection has failed!" ;
echo "Attempted to connect to $ftp_server for user $ftp_user_name" ;
exit;
}else{
echo "Connected to $ftp_server, for user $ftp_user_name" ;
}
// upload the file
$upload = ftp_put($conn_id,$destination_file,$source_file,FT P_ASCII );


// check upload status
if(!$upload){
echo "FTP upload has failed!" ;
}else{
echo "Uploaded $source_file to $ftp_server as $destination_file" ;
}


// close the FTP stream
ftp_close($conn_id);


//SSH CONNECT


$connection = ssh2_connect('smemo1.comm2000.it', 22);
if (ssh2_auth_password($connection, 'logo', 'su0n3r13')) {
echo "Authentication Successful!\n";
} else {
die('Authentication Failed...');
}


[HERE I WANT WHEN IT CONNECTED BY SSH I WANT THAT THE FILE UPLOADE WILL COPIED TO THE DIRECTORY LIKE "export/logo/mug01 and export/logo/mug02 "]


?>
</body>
</html>






HELP ME THANKS