HTTP_GET_PAGE2 Function
Syntax
Arguments
- urlCharacter
The URL of the selected page.
- include_headersLogical
Default = .F.. .T. = Includes the headers of the server response along with the body. This is similar to the behavior of HTTP_GET_PAGE Function.
- timeoutNumeric
Default = -1. Specifies the time, in seconds, after which the function should time out if a complete response has not been received from the server.
Returns
- Page_TextCharacter
The HTML text of the selected page. Null if the server cannot be contacted.
Description
Use the HTTP method GET to retrieve the specified URL.
The HTTP_GET_PAGE2() function retrieves the body of a selected page using HTTP/1.1 GET. This function uses ActiveX to request the site through MSXML and will use your Windows cookies, stored passwords, cache, proxy, and other Internet settings. Contrast with the HTTP_GET_PAGE Function which returns the full response including the headers sent by the remote server but does not directly use cookies, [password and other Windows settings.
HTTP_GET_PAGE2() supports SSL when you use " https://... ".
Example
dim cc as C cc = http_get_page2("http://my.yahoo.com/") ? cc = <html><head><title>Welcome to My Yahoo!</title><meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" l gen true for "http://my.yahoo.com" r ( nz 0 vz 0 lz 0 oz 0 ca 1))'><link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"><style type="text/css"> <!-- .hb {background-color:#770077;} .sb {background-color:#dcdcdc;} .hf {font-family:Arial;color:#ffff00;} .sf {font-family:Arial;font-size:smaller;color:#000000;} .bb {background-color:#ffffff;} .bf {color:#ffffff;} .nb {background-color:#eeeeee;} .btn {cursor:hand;font-family:Verdana,"MS Sans Serif",Charcoal,Chicago,Arial;font-weight:normal;font-size:smaller;color:#000000;background-color:#dcdcdc;} .an {background-color:#fdfdfd;} .aw {background-color:#ffffff;} body,table,tr,td,th,tt {} --> </style> <script language=javascript> <!-- var remote = NULL; function rs(n,u,w,h) { remote = window.open(u, n, 'width=' + w + ',height=' + h +',resizable=yes,scrollbars=yes'); if (remote != NULL) { if (remote.opener == NULL) ...
Limitations
Desktop Applications Only
See Also