问题
There are many examples on how to get a single image, but what is the PHP way of getting ALL images
回答1:
Please read: http://curl.haxx.se/docs/faq.html#Can_I_do_recursive_fetches_with
You can probably call wget
through php and do something similar like this.
wget -A png,jpeg,jpg -r http://www.yoursite.com &
This will spawn an asynchronous operation and download all file endings listed with the -A option.
回答2:
I found a webbot example in a book once.
Sample code :
http://www.schrenk.com/nostarch/webbots/scripts/reader.php?show=image_capture_bot.php
You can download the LIB_download_images.php required by visiting the link below : http://www.schrenk.com/nostarch/webbots/DSP_download.php
Good luck
来源:https://stackoverflow.com/questions/4630182/how-do-i-get-all-images-form-a-remote-server-using-php-curl