cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to Download an attachment from the URL

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 22 Sep 2010 19:41:06 -0700

On Wed, Sep 22, 2010 at 10:15:38PM -0400, bharadwaj nagendra wrote:
> I am trying to download a .gz file from a website. I am using cURL for web
> scrapping. I am last step in my process to download the report.

curl command-line questions should really be directed to the curl-users list.

> when I hit the URL, the report is coming as an attachment to the URL fired on
> the same page.
>
> can you kindly provide the syntax to download the attachment that has been
> responsed by the URL and save it.

Sounds like the site is using a redirect to the downloadable file. See
http://curl.haxx.se/docs/faq.html#Redirects_work_in_browser_but_no

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-23