Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

urlread - Download content at URL into MATLAB string

Syntax

str = urlread(URL)
str = urlread(URL, method, params)
[str, status] = urlread(...)

Description

str = urlread(URL) reads Web content at the specified URL into the string str. If the server returns binary data, str is unreadable.

str = urlread(URL, method, params) uses a method of 'get' or 'post', and passes information in params to the server. params is a cell array of parameter name/value pairs.

[str, status] = urlread(...) returns a status of 1 when the operation is successful. Otherwise, status is 0.

To save Web content to a file instead of a string, use urlwrite.

Examples

Download the page on the MATLAB Central File Exchange that lists submissions related to urlread, found at http://www.mathworks.com/matlabcentral/fileexchange/?term=urlread.

samples = urlread(...
     'http://www.mathworks.com/matlabcentral/fileexchange',...
     'get', ...
     {'term','urlread'});

Alternatives

urlread and urlwrite can download content from FTP sites. Alternatively, use the ftp function to connect to an FTP server and the mget function to download a file.

See Also

ftp | urlwrite | web

How To

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS