cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Download files from HTTP

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Thu, 30 Oct 2008 10:07:39 -0500

On Thu, Oct 30, 2008 at 9:30 AM, Qi Xiang Chi <qi_xiang_chi_at_hotmail.com>wrote:

> In internet explorer I can download the files by:
> 1. Logon to the site:
>
> http://edw.morningstar.com/login.aspx?email=scott.tiger@company.com&password=PASSWD
> 2. Download the file:
> http://edw.morningstar.com/download.aspx?action=ExtendedMasterlist
>
> I was asked to automate download process by using CURL, but I can't get the
> login right.
> I tried the following:
> curl -u scott.tiger_at_company.com:PASSWD -x webproxy:8080
> http://edw.morningstar.com/login.aspx
> curl -form-string scott.tiger_at_company.com;PASSWD -x webproxy:8080
> http://edw.morningstar.com/login.aspx
> curl --form-string email=scott.tiger_at_company.com;password=PASSWD -x
> webproxy:8080 http://edw.morningstar.com/login.aspx
> curl -F email=scott.tiger_at_company.com;password=PASSWD -x webproxy:8080
> http://edw.morningstar.com/login.aspx
>
> How can I logon to the site?
> Any help is welcome. Thanks.
>

At the very least, you probably need to save/send cookies. There's a lot of
useful information here:

     http://curl.haxx.se/docs/httpscripting.html

Ralph Mitchell

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-10-30