Quote: "open to read 'www.domain.com/version.txt',version$"
That's not at all how that command works. The file commands can only read from the local file.
If you want just a simple function, you can use this. The benefits of using just this function are that it's very simple, self-contained, and requires no extra plugins.
function download(from$,to$)
if file exist(to$) then delete file to$
load dll "urlmon",1 : load dll "wininet",2
failed_delete_cache = CALL DLL(2,"DeleteUrlCacheEntryA", from$)
failed=CALL DLL(1,"URLDownloadToFileA",0,from$,to$,0,0)
delete dll 2 : delete dll 1
endfunction failed
To use this function, just pass the URL of the download to the
from$ variable, and the filename to save to as the
to$ variable.
The only problem with this is that the download runs in a separate process, and won't stop your program. So you might have trouble with that unless you are familiar with the windows API.
If you want a good plugin that can do the same features, try the
Download plugin by Rudolpho. I haven't used it but it seems good.