cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl to download a file, not the web page

From: Alessandro Vesely <vesely_at_tana.it>
Date: Fri, 15 Jun 2007 08:28:18 +0200

Guirong Wang wrote:
> Hi, all
> I am working on downloading files with curl. The files are listed in a
> form text area of a web page https://somesite.com/retrieve.aspx, which
> is a self-post page. With browser, if you select a file name and click
> the "download" button, the file can be downloaded. With curl, I filled
> out all the form fields with contents as shown in LiveHTTPHeaders, but
> the expected file is not downloaded, instead, the web page itself,
> which contains the form text area with file names listed, is
> downloaded . Can anybody help me out? Thanks.

Save the headers downloaded with curl and find out the difference. There
must be one: the question is not how curl differs from firefox, but how
can the remote server tell the difference. If the difference is not in
the headers, the server may use cookies and/or hidden fields to monitor
what the client is doing.
Received on 2007-06-15