There was a thread that covered part of this issue, but it never really got resolved completely.
I now have everything working the way it is supposed to with the single exception of the transfer of the .csv file from my server to the secure server of my vendor.
If anyone could take a few minutes to help me wrap this thing up, I would appreciate it. Was trying not to get into the weekend with out a resolution, but that may not happen.
I'll post the piece of code that relates specifically to this, but if you need the entire script, (only 140 lines) then I can provide that as well.
It is apparently getting logged into the vendors server, based on where the error occurs.
The result that I'm getting is that the transfer fails, and I don't know why.
Any positive feedback and suggestions would be greatly appreciated.
thanks
douglas
$domain = 'http://www.'.$siteurl;
$directory = '/enroll_updates/';
$filename = 'TEST_24houredocs_STANDARD_'.date('Ymd',(strtotime('-1 day',strtotime($created)))).'.csv';
// writes .csv file to my server
$fd = fopen ( $_SERVER['DOCUMENT_ROOT'].$directory.$filename, "w");// open file to write to
fputs($fd, $output);// write the data to the opened file
fclose($fd); // Close the file
// use CURL to ftp to vendor secure server
//Create your connection
$dest_file_path = '/';// to put it in the root directory
$ftp_conn = ftp_ssl_connect('ftps.vendorurl.com');
$user='username';
$pass='password';
//Login
$login_result = ftp_login($ftp_conn, $user, $pass);
if( $login_result ){
//Set passive mode
ftp_pasv( $ftp_conn, true );
// Transfer file
$transfer_result = ftp_put( $ftp_conn, $dest_file_path, $filename, FTP_BINARY );
//Verify if transfer was successfully made
if( $transfer_result){
$subject="Successful at ";// successful tranfer of data file
}else{
$subject="Failed at ";//tried to send file and failed
}
}