Platform |
Win32, x64 |
Purpose |
To to read the contents of a URL. |
Syntax |
SUBROUTINE READ_URL@(URL, FILE, MODE, ERROR) |
Description |
If this routine succeeds (i.e. an internet connection is available and the URL can be accessed), ERROR is set to zero and the data from the URL is transferred to the specified file (which can be a full path name). If MODE=0, the data is assumed to be text and new lines are converted to DOS style. If MODE=1, binary data is assumed. The URL can be quite general. In particular, you can use an FTP address assuming anonymous access is possible, or an HTTP address with extra information attached. For example, you could query a search engine directly using this routine. If you want more control over how the download is controlled you can set a callback for this routine. The callback will be called at a point in the download process at which you can configure the connection. The callback is set via:
SUBROUTINE SET_INTERNET_CB@(cb)
INTEGER FUNCTION SET_INTERNET_PARAM@(PARAM, VALUE) PARAM is one of the option flags listed here: https://docs.microsoft.com/en-us/windows/win32/wininet/option-flags. SET_INTERNET_PARAM@ returns the previous value for the given parameter. If VALUE is set to zero then the existing value is returned without setting a new value. |
See also |