cURL / Mailing Lists / curl-users / Single Mail

curl-users

cURL command line https download problem

From: rajeshwari Viswannathan <rajeshwari.v2413_at_gmail.com>
Date: Fri, 27 Mar 2009 14:57:31 -0500

Hi,

I need to login to a https site with user and password. It brings up a new
page wherein I need to click an item, say 'sent', which in turn will give me
another page. There are files under this page which I need to download.

I tried using the cURL command line.
This is in Korn

#!/bin/ksh
/opt/sfw/bin/curl -k --proxy myproxy.com:3128 \
 -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7)
Gecko/2009021910 Firefox/3.0.7" \
--trace traceamex_https19.txt -o myhtml19 -c cookies_amex00.txt -3
https://mysite.com/~

/opt/sfw/bin/curl -k --proxy myproxy.com:3128 \
 -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7)
Gecko/2009021910 Firefox/3.0.7" \
--trace traceamex_https20.txt -o myhtml20 -d
"btnLogin=Log%20In&langCombo=English&password=pass&start-url=/~&switch=Log%20In&user=MYUSER"
-L \
-e https://mysite.com/~ -3 -b cookies_amex00.txt -c cookies_amex11.txt
https://mysite.com/~

It always gets the login page. It does not get the 2ndpage at all. It does
not create any cookies at all. It creates the myhtml19. That is the login
page. It does not create the 2nd page with the sent item.

The post is not happening.

I have set the user-agent, proxy

I have checked in Firefox. After it logs in, it creates the cookie file,
when I login manually.

Pl. do help me.

I need to automate this.

Thx
peacelover2413

-------------------------------------------------------------------
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 2009-03-27