.: Click here to download :.
In order to read the content at a URL you can use URLREAD/URLWRITE Matlab commands. These functions allow user to
use POST/GET methods. To achieve a deeper interaction with web server in some circustances you have to pass/read
also the content of header. The header contains several notable items which include the value
of the content-length header field, the value of the content-type header field, the content encoding of the
resource that the URL references (or null if not known), the value of the expires header field,
the sending date of the resource that the URL references, the value of the last-modified header field and many other
useful parameters.
For this reason we have developed two simple functions, based on original URLREAD and URLWRITE commands, that
allow user to:
- read the header fields
- send proper header field to remote server
- set a timeout value
- save contents of URL to file
For more details please visit JAVA official guide http://java.sun.com/javase/6/docs/api/java/net/URLConnection.html.
Index Terms: Matlab, source, code, URL, POST, GET, header, timeout, http, request, fetch.
Figure 1. Network web server |
|||
A simple and effective source code to read content at URL. |
|||
Release |
Date |
Major features |
|
1.0 |
2009.02.26 |
|
|
This software is completely free.
The authors have no relationship or partnership
with The Mathworks. All the code provided is written in Matlab
language (M-files and/or M-functions), with no dll or other
protected parts of code (P-files or executables). The code was
developed with Matlab 2006a.
The code provided has to be considered "as is" and it is without any kind of warranty. The
authors deny any kind of warranty concerning the code as well
as any kind of responsibility for problems and damages which may
be caused by the use of the code itself including all parts of
the source code.