Downloading text in applescript

Let’s just say that I have a text file on my website at:

www.myreallycoolsite.com/my_even_cooler_text_file.txt

Is there anyway to get AppleScript to download the contents of the text file into a variable or text box?

Thanks!

set the_url to "http://www.myreallycoolsite.com/my_even_cooler_text_file.txt"
set the_script to "curl " & (quoted form of the_url)
set file_contents to do shell script the_script

j

Oh yeah… curl. I remember reading about that in my Unix Books…

Thanks so much!

Finally, I can start working on my “Check for updates” utility. :cool:

OK, I’m just not getting this…

presently I’m using this code:


	set the URL1 to "http://www.melissadata.com/Lookups/CartZip.asp?Zip=75035&Submit=Submit"
	set the raw1 to (desk & "Mailing Script:75035.txt")
	tell application "URL Access Scripting"
		download URL1 to file raw1 replacing yes
	end tell

It used to work fine but the website now checks for cookies so’s I’ve got to use cURL I guess.

can somebody help me convert the above into something using cURL that will “accept” cookies and save the data to the file I’m specifying?

I don’t see where the above scriplet(s) examples specify where the file is going to be saved.

Oh! and how do I use the -b/ switch in cURL? Do I need to specify where cookies are going to be stored? Every time the script runs?