Hello,
i wrote a function for this when i was developing
Game Manager.
here is the function:
getFileFromURL( "http://img72.imageshack.us/img72/8885/bob2qd1.gif" )
wait key
end
Function getFilefromURL( url$ )
` get file name and destination
size = len( url$ ) : d=0
repeat
inc s, 1 : st$ = right$( url$, s ) : c$ = mid$( st$, 1 )
if c$ = "/"
filename$ = right$( url$, s-1 ) : d=1
endif
until d=1
destination$ = get dir$()+"\"+filename$
print "downloading file: "+filename$
print "from: "+url$
print
` download file
load dll "urlmon", 1
result = call dll(1, "URLDownloadToFileA", 0, url$, destination$, 0, 0)
delete dll 1
` did it download?
if result <> 0
print filename$+" cannot be downloaded."
Else
print filename$+" was downloaded"
endif
EndFunction