cURL / Mailing Lists / curl-users / Single Mail

curl-users

Download using cURL

From: Bonatakis, Lori \(UITS Peoplesoft Consultant\) <BonatakisL_Peoplesoft_at_uconn.edu>
Date: Mon, 27 Dec 2004 14:37:26 -0500

I need to download an html report from a website using cURL. I have had great success uploading files using cURL, but have not downloaded before.

The webmaster at the site I am trying to download from has given me a direct URL link to pull the report into a browser as shown below (uid and pw's *** out):

https://web1.ncaa.org/compliance/exec/adhocrunner?&orgId=*********&orgPassword=********&userId=*********&userPassword=*********&reportId=6397.0

The above link works perfectly when pasted into a browser. However, I when I run the command below from a Unix command line, I get an "Invalid OrgID and OrgPassword" message in the output file. Yes, the id's and pw's are exactly the same as the ones that work in the browser.

curl -o outputfilename https://web1.ncaa/etc....(line above)

I have been told by our resident web specialist that this could be a cookies issue, so I looked through the history of problems on the cURL web site for solutions. I can successfully capture the cookies using the -c --cookie jar. I have then tried to put the cookies back up to the server by calling cURL again using -b cookies.

I guess I'm missing something because I am still getting invalid org id and password in the output file as a result of issuing the commands below:

curl -s -S -L -c cookiefile https://web1.ncaa.org/compliance/exec/adhocrunner?&orgId=*********&orgPassword=********&userId=*********&userPassword=*********&reportId=6397.0 (cookies are written to the file)

curl -s -S -L -b cookiefile -o outputfilename https://web1.ncaa.org/compliance/exec/adhocrunner?&orgId=*********&orgPassword=********&userId=*********&userPassword=*********&reportId=6397.0

I copied the above from a previous solution from this site. Am I missing something? Are there instances where cURL will not work based upon the server configuration on the other end? Help!!!

Lori Bonatakis
University of CT
Received on 2004-12-29