I was hoping that someone has either already written something like this or can at least give me a concept of how I should go about it.
I have a list of SKU's in a database for products. I want to take that list of skus and ftp image files from another server that match those skus.
The images are named by the sku of the product.
So somehow I need to read the list of sku's from the sql database and then put them into an array - I think. Then read out of this array for the file names to ftp to my local server.
Any clues?
Burke
ftp files down that match a list in a SQL table?
Moderator: General Moderators
Here is what you could do.
You kind of have the files in an array already the recordset.
Now what you can do is place all of the files in an http directory.
Next use wget to download the images.
You can probally also do this with ftp some how but, I think you have the basic idea
select img_nm from prod_table
while rs is not empty
{
wget the file and save it to the location that you would like it to be at
make sure permission are set correctly
}
You kind of have the files in an array already the recordset.
Now what you can do is place all of the files in an http directory.
Next use wget to download the images.
You can probally also do this with ftp some how but, I think you have the basic idea
select img_nm from prod_table
while rs is not empty
{
wget the file and save it to the location that you would like it to be at
make sure permission are set correctly
}