How to read a file on web

Blitz3D Forums/Blitz3D Programming/How to read a file on web

patmaba(Posted 2010) [#1]
Hello everyone,

I am looking for a way to retrieve and reading a file from web with Blitz3D

Call the CSV file. For example:
https://www.google.com/finance/historical?q=NASDAQ:ORCL&output=csv

I want to be able to read the stream directly from web, avoiding writing and parsing file to disk, is it possible with B3D?

Thank you for your help.

Patmaba


_PJ_(Posted 2010) [#2]
As far as I know, it's only possible by downloading a copy of the file, then reading the copy as a local file.
This is pretty much what browsers do anyway.

I guess if the right ports were open on the server, and the server was actively transmitting the correct data in chunks that could be 'picked up' by B3D then it might work, but I can't see this being very esasy for files that aren't typically encoded for streams, such as audio/video etc. Even these, I am guessing, are still downloaded and processed as local objects.

A lot of this is pure speculation, and there's certainly a lot more knowledgeable folk than me around here :)

---------------------

Edit: I did just find this, though, which might be of use (and kinda contradicts what I said above :D )

http://www.blitzbasic.com/codearcs/codearcs.php?code=1023


RifRaf(Posted 2010) [#3]
If you want to save a file to a bank, using the same file commands you would if you wrote to disk, you can use the Bank IO commands i put in the archives.

http://www.blitzbasic.com/codearcs/codearcs.php?code=2412