Thank you to anyone that can answer this...
I am trying to download a file from an FTP server that I have access to.
I have build this function to do it:
<?php
function Get($sLocalFile, $sRemoteFile, $sFolder="download/data/")
{
$CONN = $this->_connect();
if($CONN != false)
{
// CHANGE DIRECTORY
if($sFolder != "")
{
if(!ftp_chdir($CONN, $sFolder))
{
echo "Could not change directories!<br>";
exit();
}
}
$THELOCALFILE = fopen($sLocalFile,"w");
ftp_fget($CONN, $THELOCALFILE, $sRemoteFile, FTP_ASCII);
}
else
{
echo "Failed to open ftp connection!<br>";
}
}
?>
I keep receiving this error:
Warning: ftp_fget() [function.ftp-fget]: IP: XX.XX.XXX.XXXX Port 56615 Noted. Command okay. in /public_html/SCHEDULED_TASKS/LEC/PROCESS_MAIL.php on line 179
No matter what I've tried, I have not been able to copy the file from a remote server to my server. I have been able to manually download the file and I have verified that the file exists on the server.
The file extension is an .ERR, i have tried to save it as both a .ERR and a .txt file, I have tried the ftp_get, ftp_fget and ftp_nb_get and each time I end up with the same error.
I have added in the ftp_chdir as well. I have tried it with and without...
I have been searching relentlessly on what might cause this error or what I can do to fix it.
I have also tried using the '@' and got no help with that.
Thank you for any help!!!