Description

An OLE function used to retrieve the contents of a webpage.

Syntax

retval = OLE_GetWebPageurl, method, payload, credentials )

Parameters

ParameterDescription
urlThe web address of the webpage to retrieve.
methodGET or POST. This parameter defaults to GET.
payload<Optional> For a POST request, this is the POSTED data. This parameter defaults to NULL.
credentials<Optional> If proxy authentication is needed, pass the credentials as username : @fm : password. See http://support.microsoft.com/kb/315909 for info on Proxy Authentication
headers<Optional> An 2-level @fm-delimited array of associated @vm-delimited header values. If specified, these values are sent when the HTTP request is initiated.

Returns

The response from the URL

Remarks

This function uses the MS ServerXMLHttp protocol. This function allows calls to SSL sites and can send authenticated requests.

Example

Declare Function Ole_GetWebPage
 
url = "http://www.google.com"
retval =  ole_getwebpage( url )
Swap Char(13) : char(10) With @fm In retval
Swap char(10) With @fm In retval
Swap @fm With char(13) : char(10) In retval
OSWrite retval To "C:\url.txt"
  • No labels