简体   繁体   English

我如何使用php / cURL从远程服务器获取所有图像

[英]how do i get ALL images form a remote server using php/cURL

关于如何获取单个图像有很多示例,但是获取所有图像的PHP方法是什么?

Please read: http://curl.haxx.se/docs/faq.html#Can_I_do_recursive_fetches_with 请阅读: 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. 您可能可以通过php调用wget并执行类似的操作。

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. 这将产生一个异步操作并下载带有-A选项列出的所有文件结尾。

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 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 您可以通过访问以下链接下载所需的LIB_download_images.php: http : //www.schrenk.com/nostarch/webbots/DSP_download.php

Good luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM