Download a file through HTTP

BlitzMax Forums/BlitzMax Programming/Download a file through HTTP

Blueapples(Posted 2006) [#1]
Has anyone downloaded files from a HTTP server with a Max program?


FlameDuck(Posted 2006) [#2]
Yes.


Blueapples(Posted 2006) [#3]
Okay then.


Grey Alien(Posted 2006) [#4]
There must be commands in the help. I did it in BPlus but the commands probably aren't the same.


AlexO(Posted 2006) [#5]
wouldn't this work?
LoadBank("http::www.somedomain.com/myFile.doc")


never tried it, but I've seen it posted for loading images off the internet.


tonyg(Posted 2006) [#6]
Doesn't the readstream example do this?


Blueapples(Posted 2006) [#7]
Yep, this is working, thanks...

Local Bank:TBank
Local Result:Int = 0
Bank = LoadBank(RemoteURL)
If Bank = Null Then
	Result = 0
Else
	SaveBank(Bank, LocalURL)
	Result = 1
End If



Yan(Posted 2006) [#8]
A simple search would have saved you a 4 hour wait.


Tom Darby(Posted 2006) [#9]
Now get off our lawn!


Blueapples(Posted 2006) [#10]
I did several searches. The search functionality of the forum sucks, that's all there is to it. It's very difficult to find anything. More to the point, I'm sorry, but "LoadBank" is not exactly an intuitive name for a command that can load a file from a URL.


Yan(Posted 2006) [#11]
...


FlameDuck(Posted 2006) [#12]
More to the point, I'm sorry, but "LoadBank" is not exactly an intuitive name for a command that can load a file from a URL.
How about OpenStream or LoadImage? All I/O commands can load files from http, ftp or filesystem sources.