GetURLImage

Purpose

This function returns a web page image file.  This is useful for retrieving pages like weather satellite maps, and then displaying the maps in a HomeSeer device.

Parameters

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 image to retrieve from the server, such as "/logo.gif".  It should be fully qualified as referenced from the host parameter above, such as "\images\something\other\logo.gif" if necessary.

Optional Parameter: strip_tags
Type: boolean
Description: This parameter is ignored in GetURLImage.

Optional Parameter: port (Default=80)
Type: integer
Description: This is the port number on the server to connect with (80 = standard web server).

Optional Parameter: filename
Type: string
Description: This is the file that you would like the downloaded image to be stored in.  If the filename is not fully qualified, then the HomeSeer path will be prepended to the string provided.  This is recommended for VBS scripts to prevent trying to work with the byte array return which cannot be written to a file easily using VBS script accessible objects.

Returns

Return value: page image
Type: byte array (.NET Object or VBScript Variant)
Description: This is the contents of the requested web page image.  If an error occurs, the text "ERROR:" will be returned followed by a reason for the error.