Luckily the Unity team have made this really simple:
var dataString: String;
var url = "http://www.mysite.com/data.txt";
function Start () {
// Start a download of the given URL
var www : WWW = new WWW(url);
// Wait for download to complete
yield www;
// assign data from URL to string
dataString = www.data;
}
function OnGUI() {
GUI.Label(Rect(100, 100, 140, 20), dataString);
}
Reference: http://unity3d.com/support/documentation/ScriptReference/WWW.html