nlewis Posted December 20, 2006 Share Posted December 20, 2006 I am wondering if anyone knows how to ftp into a remote server pull down a directory of images and upload it to your local server images folder. I had no problem doing this with a txt file, but can't seem to figure it out with image files. If anyone could please help! Thanks!! Link to comment https://forums.phpfreaks.com/topic/31424-ftp-image-download-upload-help/ Share on other sites More sharing options...
matto Posted December 21, 2006 Share Posted December 21, 2006 Can you describe how you are doing this with txt file Link to comment https://forums.phpfreaks.com/topic/31424-ftp-image-download-upload-help/#findComment-145622 Share on other sites More sharing options...
nlewis Posted December 21, 2006 Author Share Posted December 21, 2006 This is how I download and uploaded the text file.$conn = ftp_connect($ftpServer);$remoteFile = '/InventoryWeb.txt';$localFile = 'inventoryLocal.txt';if (@ftp_login($conn, $ftpUser, $ftpPass)) { echo "Connected as $ftpUser@$ftpServer<br>"; $testList = ftp_rawlist($conn, '/'); //GET REMOTE FILE & UPLOAD LOCALLY if (ftp_get($conn, $localFile, $remoteFile, FTP_BINARY)) { echo "successfully uploaded to $localFile\n"; } else { echo "There was a problem while uploading $remoteFile to $localFile\n"; }ftp_close($conn); } Link to comment https://forums.phpfreaks.com/topic/31424-ftp-image-download-upload-help/#findComment-145828 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.