curl-users
Re: Download files from HTTP
Date: Fri, 31 Oct 2008 21:39:15 -0500
On Thu, Oct 30, 2008 at 11:59 AM, <Chi.Hsiang.Chih_at_fortisinvestments.com>wrote:
> Ralph,
>
> Thank you for the tip. I'm new to CURL, but find it great tool.
>
> Now I'm able to logon with cookies and redirection.
> curl -L -c newcookies.txt -d "email=scott.tiger%40company.com&password=PASSWD"
> -x webproxy:8080 http://edw.morningstar.com/login.aspx/login.aspx
>
> But still can't download the file. What am I doing wrong?
> curl -L -O -c newcookies.txt -x webproxy:8080
> http://edw.morningstar.com/download.aspx?action=ExtendedMasterlist
>
I think you missed a bit - the "-c cookiejar" only *writes* cookies to a
file. On subsequent calls you need to tell curl to *read* the cookiejar. I
do every curl call like this:
curl -s -S -L -b cookies -c cookies -x .........
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-11-01