Hello all,
I have a question regarding saving multiple files from a remote source. I want to use a php script to save all .jpg files in a dir of a remote place (my supplier in which I’ve asked and been granted permission to do so) but I have no real idea where to start actually.
I know how to grab a single file from their server using
[php]
<?php $url = 'theirurl/images/nameofimage.jpg'; $img = 'output.jpg'; file_put_contents($img, file_get_contents($url)); ?>[/php]
Tho I am having trouble picturing in my head how I would make it go through the list of .jpg and simply grab the file name and save it as the same file name and then move on to the next file until all of the images are grabbed.
If this is possible I would really like to know at least how it’s possible.
Thanks
~
V