如何使用php / cURL从远程服务器获取所有的图像 [英] how do i get ALL images form a remote server using php/cURL
本文介绍了如何使用php / cURL从远程服务器获取所有的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有很多关于如何获取单个图片的示例,但什么是获取所有图片的PHP方式
There are many examples on how to get a single image, but what is the PHP way of getting ALL images
推荐答案
请阅读: http://curl.haxx.se/docs/faq.html#Can_I_do_recursive_fetches_with
您可以通过php调用 wget
,并执行类似的操作。
You can probably call wget
through php and do something similar like this.
wget -A png,jpeg,jpg -r http://www.yoursite.com &
这将产生一个异步操作并下载用-A选项列出的所有文件结尾。
This will spawn an asynchronous operation and download all file endings listed with the -A option.
这篇关于如何使用php / cURL从远程服务器获取所有的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文