lorddemos90 Posted April 10, 2007 Share Posted April 10, 2007 <?php $ftp_server = "mls.momls.com"; $ftp_user_name = "LOGIN"; $ftp_user_pass = "PASS"; echo "<BR>Beginning Downloads " . date("H:i:s",mktime()) . "<BR>"; $conn_id = ftp_connect($ftp_server,21); if($login_result = ftp_login( $conn_id, $ftp_user_name, $ftp_user_pass )) { echo "<DIV>Connected.</DIV>"; ftp_chdir($conn_id,"/peninsulagr"); $arr_files = array(); $arr_files[] = "DailyDataSF.zip"; $arr_files[] = "DailyDataRNT.zip"; $arr_files[] = "DailyDataMUL.zip"; $arr_files[] = "DailyDataLND.zip"; $arr_files[] = "DailyDataCON.zip"; $arr_files[] = "DailyDataCII.zip"; $arr_files[] = "DailyDataAC.zip"; set_time_limit(1000); foreach($arr_files as $filename) { if(ftp_get($conn_id, $filename,$filename,FTP_ASCII)) { echo "<DIV>Downloaded " . $filename . "</DIV>"; flush(); } } } else { //end if echo "<DIV>Unable to login.</DIV>"; exit; } ?> I used this code before, but now I'm getting these errors: Warning: ftp_get() [function.ftp-get]: Opening ASCII mode data connection for DailyDataSF.zip(20686 bytes). in C:\htdocs\databasestuff\admin\ftptest.php on line 27 Warning: ftp_get() [function.ftp-get]: Can't open data connection. in C:\htdocs\databasestuff\admin\ftptest.php on line 27 Warning: ftp_get() [function.ftp-get]: PORT command successful. in C:\htdocs\databasestuff\admin\ftptest.php on line 27 Warning: ftp_get() [function.ftp-get]: Opening ASCII mode data connection for DailyDataMUL.zip(4053 bytes). in C:\htdocs\databasestuff\admin\ftptest.php on line 27 Warning: ftp_get() [function.ftp-get]: Can't open data connection. in C:\htdocs\databasestuff\admin\ftptest.php on line 27 Warning: ftp_get() [function.ftp-get]: PORT command successful. in C:\htdocs\databasestuff\admin\ftptest.php on line 27 Warning: ftp_get() [function.ftp-get]: Opening ASCII mode data connection for DailyDataCII.zip(2773 bytes). in C:\htdocs\databasestuff\admin\ftptest.php on line 27 What's going on here??!?!?!?!?!! Link to comment https://forums.phpfreaks.com/topic/46494-ftp-download-script-no-longer-works/ Share on other sites More sharing options...
lorddemos90 Posted April 10, 2007 Author Share Posted April 10, 2007 is it possible that the new version of php supports ftp differently than previous versions? Link to comment https://forums.phpfreaks.com/topic/46494-ftp-download-script-no-longer-works/#findComment-226385 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.