cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: asp script downloads file, how to get file?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 27 Jan 2006 11:01:36 +0100 (CET)

On Fri, 27 Jan 2006, Brian Austin wrote:

> Im trying to download files from a site thats powered (chuckle) by asp. the
> link the file downloads from is (eg)
> http://www.site.com/download.asp?lang=2&prodcode=13
>
> which will bring up a dialog to save thefile_en_{semi random number}.zip
>
> how do I get the file to disk with curl? with the filename (???.zip)
> provided by the site...

Capture your HTTP traffic with LiveHTTPHeaders and then repeat that with curl.

> Also I'd like to check and see if I have the file already on disk before
> redownloading it.

curl has the -z option, but otherwise I suggest you write a wrapper script
that checks if the file is already present. curl doesn't offer that function.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-01-27