| Contents | Index |
urlwrite(URL,filename)
urlwrite(URL,filename,method,{Name,Value})
[filestr,status]
= urlwrite(URL,filename)
[filestr,status]
= urlwrite(URL,filename,method,{Name,Value})
urlwrite(URL,filename) reads Web content at the specified URL and saves it to the file specified by filename.
urlwrite(URL,filename,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.
[filestr,status] = urlwrite(URL,filename) stores the file path in variable filestr, and suppresses the display of error messages. When the operation is successful, status is 1. Otherwise, status is 0.
[filestr,status] = urlwrite(URL,filename,method,{Name,Value}) passes data to the server and suppresses the display of error messages.
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.
filestr |
String containing the path of the file. |
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 urlwrite. Save the results to samples.html in the current directory:
urlwrite(...
'http://www.mathworks.com/matlabcentral/fileexchange',...
'samples.html', ...
'get', ...
{'term','urlwrite'});Alternatively, specify the complete URL:
fullURL = ['http://www.mathworks.com/matlabcentral/fileexchange' ...
'?term=urlwrite'];
urlwrite(fullURL,'samples.html');View the file:
web('samples.html')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.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |