This function returns a web page. This is useful for retrieving pages like news and weather, and then having a Speaker Client speak the contents for you. This method can also be used to retrieve images, including JPG or GIF images. This function has extended features compared to the similar function GetURL - it can return a byte array, which is useful when retrieving binary data, and it attempts to decode the page data encoding so that the data is properly decoded using Windows-1252 or UTF-8.
Parameter: host
Type: string
Description: This is the name or IP
address of host to connect to, such as "HomeSeer.com".
Parameter: page
Type: string
Description: This is the page to retrieve
from the server, such as "/news.htm".
Parameter (ByRef): ElapsedTime
Type: string
Description: Provide an empty string variable for this parameter, and when
the procedure is finished, it will contain a formatted string with the
total time the page download required.
Optional Parameter:
port
Type: integer
Description: This is the port number on the server to connect with (80
= standard web server). If
this parameter is not provided, a value of 80 will be used.
Optional Parameter:
strip_tags
Type: boolean
Description: Use TRUE to strip HTML tags from the returned page or FALSE
to not alter the page.
Optional Parameter:
ByteArray
Type: boolean
Description: If set to TRUE, then the return from the function will be
an array of bytes instead of a string.
Optional Parameter:
FileName
Type: string
Description: If this parameter is not null or empty, then the downloaded
web page will be automatically saved into the file named with this parameter.
HomeSeer
must have write access to the directory where the file is to be placed.
An existing
file by the same name will be OVERWRITTEN.
Return value: page
contents
Type: string or
byte array
Description: This is the contents of
the requested web page. If
an error occurs, the text "ERROR:" will be returned followed
by a reason for the error.