| Contents | Index |
str = urlread(URL)
str = urlread(URL,method,{Name,Value})
[str,status]
= urlread(URL)
[str,status]
= urlread(URL,method,{Name,Value})
str = urlread(URL) downloads the Web content from the specified URL into the string str.
str = urlread(URL,method,{Name,Value}) passes data to the server using a method of 'get' or 'post'. Specify the data to send with one or more Name,Value pair arguments.
[str,status] = urlread(URL) suppresses the display of error messages. When the operation is successful, status is 1. Otherwise, status is 0.
[str,status] = urlread(URL,method,{Name,Value}) passes data to the server and suppresses the display of error messages.
To save Web content to a file rather than a string, use urlwrite.
Cell array of comma-separated pairs of Name, Value arguments, where Name is the field name and Value is the corresponding value. Required when you specify a method.
The supported values for Name and Value depend upon the Web form. You can specify several name-value pair arguments as Name1,Value1,…,NameN,ValueN.
str |
String containing the contents of the file at the specified URL. For example, if the URL corresponds to an HTML page, str contains the text and markup in the HTML file. If the URL corresponds to a binary file, str is not readable. |
status |
Number of class double that indicates whether the download is successful. When successful, status is 1. Otherwise, status is 0. |
Download the HTML for the page on the MATLAB Central File Exchange that lists submissions related to urlread:
exPage = urlread(...
'http://www.mathworks.com/matlabcentral/fileexchange',...
'get', ...
{'term','urlread'});Alternatively, specify the complete URL:
fullURL = ['http://www.mathworks.com/matlabcentral/fileexchange' ...
'?term=urlread'];
exPage = urlread(fullURL);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.

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |