cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: download multiple files through http or https

From: Nick Zitzmann <nick_at_chronosnet.com>
Date: Wed, 24 Apr 2013 09:59:34 -0600

On Apr 24, 2013, at 2:45 AM, fenghelong <fenghelongnjit_at_gmail.com> wrote:

> I have check out the example in the website,and I followed the example
> from the libcurl webpage,I found an example to download multiple files
> using FTP protocol,using FTP protocol I can use the
> CURLOPT_WILDCARDMATCH option,but my problem is that I want to download
> multiple files using HTTP or HTTPS protocol,how can I do it?

You have to use a different URL for each file you want to download, since unlike FTP, HTTP doesn't have a single method implemented by every server in existence that provides a directory listing. But if the server does provide a listing somehow (through HTML or WebDAV, for example), then you can fetch that listing and parse the results manually.

Nick Zitzmann
<http://www.chronosnet.com/>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-04-24