Hello all:
I have been looking for examples to retrieve a list of image files from a remote directory (http - standard apache index) to load into an array so I can get the 10 most recent and copy them to my server (via getstore). There are typically only 20-40 images in this directory at any given time that are being rotated out. There are other things that I am doing after that with imagemagick, but I have that handled.
I have found a few examples, but they require robot or scraping modules, I am on a shared server and I am trying to do this with the modules that are installed. I am not really scraping, as I am only hitting the one remote server, and have permission to do so.
I am usually good at getting things to work if I have good examples to go by, but I've been searching for a week now and not having much luck. Worse case, the files follow a certain format, with a date and time in the file name (they are just not sequential). I could always do a loop starting from "now" and do a getstore for every possible name until I retrieve 10 existing files, but I would think there has to be some way to get a list of files in a remote directory without getting too carried away.
Thank you for the help!
John
In reply to Remote Directory listing by johnfl68
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |