Function LoadFromUrl() Professional
Loads a document from a Web server. The function is deprecated. Use the HttpClient()class instead. Example: cResult := HttpClient():new( "http://www.alaska-software.com" ):send()
LoadFromUrl( <cURL> , ;
[<nPortNumber>], ;
[<nProtocol>] , ;
[<cProxyUrl>] , ;
[<acByPass> ] , ;
[<cMethod>] , ;
[<cPostString>], ;
[<cCookie>], ;
[<cAcceptType>], ;
[@<nStatus>], ;
[<bcUserFunc>] ) --> cWebContent | NIL
Constant | Description |
---|---|
INTERNET_DEFAULT_HTTP_PORT | Used for the HTTP protocol (non-secure communication) |
INTERNET_DEFAULT_HTTPS_PORT | Used for the HTTPS protocol (secure communication) |
Constant | Description |
---|---|
INTERNET_COMMUNICATION_PUBLIC *) | Selects the HTTP protocol (non-secure communication) |
INTERNET_COMMUNICATION_SECURE | Selects the HTTPS protocol (secure communication) |
|
The function returns the contents of an URL as character string. If the TCP/IP connection fails, the return value is NIL.
This function is used to load the contents of an URL using the HTTP or HTTPS protocol. The latter provides for a secure data exchange between client and HTTP server since data transferred via TCP/IP connections is encrypted. Calling the function with <cURL> as the sole parameter is sufficient in most cases. Special situations, like routing a request via a proxy server or submitting a HTML form, are covered by the remaining parameters.
The return value NIL indicates a connection failure which can have several reasons: The URL does not exist, illegal parameters are passed, the HTTP server is offline or there is no TCP/IP connection at all. If there is no TCP/IP connection but the computer is configured for a dial-up connection via modem, the operating system will open the dial-up dialog to establish a connection.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.