W3get_url
Synopsis
Retrieves and caches the contents located at a specific URL.
Input Port
Parameters
Output Port
LocalFile string
status string
captured int
|
Description
The W3Cget_URL module examines the contents at the location pointed to by a standard web URL, and caches the content on the user's local machine. The contents of the URL remain in the cache until they are replaced by another fetch issued by W3Cget_URL . Applications downstream from W3Cget_URL access the URL content by examining the cache.
Input
URL
Specify a valid URL address in this field. The W3Cget_URL module will grab and cache the contents contained at that location. If the URL is invalid or points to unretrievable information, the phrase " URL contains no data " appears in the status port.
Parameters
none.
Output Port
LocalFile
This is the location of the URL content cache. It is also the port that is used as input to another AVS/Express data reader. The default location is /tmp/xp_out.dat, but you can change the location at any time.
If two URLs are fetched in a row, the contents of the second URL overwrite the contents of the first URL if the location of the cache file is not changed. The LocalFile port receives a notify event after every valid URL retrieval.
status
A text field that contains status information for the current URL fetch. Messages are displayed in this field as the URL collection progresses; these messages are described below.
"No Status"
The W3Cget_URL _module has not been fired.
"URL contains no data"
The given URL is malformed, invalid, or points to a bad link.
"Reading..."
The W3Cget_URL module is in the process of accessing the URL location.
"Reading (xxx of nnn)..."
The W3Cget_URL _module has successfully retrieved xxx_total bytes from an URL containing nnn total bytes.
"Read (xxx of nnn)"
The W3Cget_URL _module has successfully retrieved xxx_total bytes from an URL containing nnn _total bytes. The retrieval was successful and has concluded.
captured
This is an integer field depicting the total number of successful URLs read and cached during the life of the current W3Cget_URL invocation.
Algorithm
The W3Cget_URL _module performs most of the URL content fetching. It is built around a modified form of the World Wide Web Consortium WWWLibrary. Restrictions placed on writing information to core memory were removed from the original library, as was content manipulation code. Information placed into the URL cache is identical to the information at the URL, and all hypertext transfer protocol is stripped off.
Example
Examples.Graphics_Display.WebMultiView
v/gd_examp/URLread1.v
File
v/w3c.v
See also related modules