Jump to content

FTP Image Download Upload help!


nlewis

Recommended Posts

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);

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.