| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
str = urlread(URL)
str = urlread(URL, method, params)
[str, status]
= urlread(...)
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.
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'});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.
![]() | upper | urlwrite | ![]() |

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 |