Using cURL with a username/password site?

I writing a applescript studio app that is bringing together data and charts from several websites and displaying it all in one window. The data is easy enough because I am getting it from Yahoo using URL Access Scripting. The problem is I am downloading the charts from a website that has a username/password front page (I do pay a subscription). When I using URL Access to download the charts ( a .png file, if that matters), the file is simply a graphic telling me to log on to the site to view the chart.

Basically, the question is… Can URL Access scripting handle this and how? Or does cURL (with which I have little experience) have the ability?



Hi ironskirt,

The cURL manual explains how to do this.

You would access cURL from a do shell script command in Applescript.

set myVar to do shell script "curl"

I have no experience in dealing with images with cURL and Applescript.


John M

thanks john for your reply,

I tried cURL with its various parameters for username:password to no avail. URL Access Scripting at least downloaded a graphics file telling to log on the the website, cURL downloaded a null file.

I did use cURL with the -i parameter to find out the site is using formsLogin.asp. So back to the web to find out what I need to do to accomplish this task.

thanks again