| MATLAB Function Reference | ![]() |
Syntax
Description
s = urlread('url')
reads the content at a URL into the string s. If the server returns binary data, s will be unreadable.
s = urlread('url',' reads the content at a URL into the string method','params')
s, passing information to the server as part of the request where method can be get or post, and params is a cell array of parameter-value pairs.
[s,status] = urlread(...)
catches any errors and returns the error code.
| Note If you need to specify a proxy server to connect to the Internet, select File -> Preferences -> Web and enter your proxy server address and port. Use this feature if you have a firewall. |
Download Content from Web Page
Use urlread to download the contents of the Authors list at the MATLAB Central File Exchange:
urlstring = sprintf('%s%s', ... 'http://www.mathworks.com/matlabcentral/', ... 'fileexchange/loadAuthorIndex.do'); s = urlread(urlstring);
Download Content from File on FTP Server
The file Moler_1.txt displays in the MATLAB Command Window.
Download Content from Local File
See Also
| upper | urlwrite | ![]() |
© 1994-2005 The MathWorks, Inc.