I have a small test script in which I am trying to download a file from my windows server. My script is running on a linux server. I can't login:
Warning: ftp_login() [ function.ftp-login]: Login authentication failed.
PHP Code:
$php_host_username = "username"; $php_host_password = "pw"; $conn = ftp_connect(ftp.mysite.com); ftp_pasv($conn, TRUE); if ($conn) { echo "ftp connect ok<br>"; if (ftp_login($conn,$php_host_username,$php_host_password)) //fails here { echo "ftp_login ok<br>"; if (ftp_get($conn,"dest.txt", "wwwroot/source.txt",FTP_ASCII)) { echo "ftp_get ok<br>"; } else { echo "ftp_get fail<br>"; } } else { echo "ftp_login failed<br>"; } } else { echo "ftp connect failed<br>"; } ftp_close($conn);
__________________
RalphF
Business Text Messaging Services
Please login or register to view this content. Registration is FREE
|