The process starts with my server, Webserver1, telling Webserver2 to archive data.
Webserver2, then archives the data and zips the file.
Webserver2 then notifies Webserver1 of the locations of the files on the internet.
Webserver1 then attempts to copy the files to its server.
I'm having problems with the last step.
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if ($login_result){
ftp_chdir($conn_id, 'public_html');
if ($mimetype == "text/Mobipocket"){
ftp_chdir($conn_id, 'mp');
$upload = ftp_put($conn_id, $BinaryDataFile, 'file.zip', FTP_BINARY);
if ($upload){
echo 'Coped MP';
}else{
echo 'Failed';
}
ftp_cdup($conn_id);
}
}else{
echo 'Could not connect';
}
$BinaryDataFile, does exist. The script actually executes and the time it takes makes it seem like its actually working. However when looking at the directories I'm unable to find the files.
Any help is appreciated.
EDIT: I figured out the problem, thanks for anyone who had a look! The file was protected by .htaccess and even though I included the credentials in the URL it didn't like it
Edited by Lang, 26 November 2006 - 08:21 PM.
