|
Contents | Previous | Next | Subchapters |
| Syntax |
URL, output file)URL, output file, "binary")
|
| See Also: | h5read , read |
"binary" and instructs the function to transfer the
file at URL in binary-mode. That is no carriage return or line feed translations
are performed.
urlget transfers the requested data in ASCII.
That is any necessary carriage return and line feed transforms that are necessary
for the given system are performed before storing the data on your system. This
provides an efficient method of loading HTML, XML, or raw text data from Internet resources.
urlget("http://www.omatrix.com/urlget.csv", "C:\temp\tst.csv")
O-Matrix will download the file urlget.csv from the home
directory on omatrix.com and save it on your local system. You can verify
that this download succeeded by entering
M = read("C:\temp\tst.csv", "int", 100, 100)
contour(M)
which will produce the following contour plot
The urlget function can also be used to access server-side CGI resources.
If you enter
clear
const tickers = {"hcow", "unfi","ebay"}
NTickers = rowdim(tickers)
uriStart = "http://table.finance.yahoo.com/table.csv?a=0&b=1&c=2002&d=11&e=31&f=2002&s="
uriEnd ="&y=0&g=w&ignore=.csv"
for i = 1 to NTickers begin
sym = tickers.row(i)
URL = [uriStart, sym, uriEnd]
oFile = [sym, ".csv"]
urlget(URL, ["c:\temp\", oFile]);
end
O-Matrix will download weekly stock data for the symbols HCOW, UNFI, and EBAY from the Yahoo
stock chart server.
urlget transfers the requested data in binary mode.
This function provides highly-optimized binary transfer of data from Internet resources
to your local system.
urlget("http://www.omatrix.com/downloads/LibSetup.zip", "C:\temp\Lib.zip", "binary")
O-Matrix will download the file LibSetup.zip from
omatrix.com and save it on your local system.