Getting font list from web site


I need to access a font list that exists as a txt file on the root of one of my servers.

I have written this which works OK, apart from closing the safari window.

tell application "Safari"
	make new document with properties {URL:""}
	set myFonts to text of front document
	return myFonts
	close window 1
end tell

Is there another way I can download get the contents of this page/txt file without displaying Safari? I am going to be calling this script from a Javascript using do script if that makes any difference to the answer!



I got the answer, just in case anyone else is interested…

function getFontList(){
var myScript = “set myFonts to do shell script "curl\”";
return (app.doScript(myScript,ScriptLanguage.APPLESCRIPT_LANGUAGE));