PhantomScript v1.7 Reference - Copyright © 2006 P1 Systems Incorporated. All Rights Reserved.

Prev | Next | Users Guide | PhantomScript Reference | P1 Systems


Networking

InternetGet

Syntax

InternetGet URL=<url> Headers=<hdrs> Result=<var> OutFile=<filename>

Description

Retrieves a file specified by a URL from the Internet.

Parameters

URL=<url>

The URL of the file to be retrieved, e.g. "http://www.p1.com/index.html".

Headers=<var>

Optional. A string containing HTTP header fields to be included in the request. Header fields should be formatted just as they are to be placed in the HTTP header, including newlines.

Result=<var>

Optional. The variable into which the file data is to be placed. If OutFile is present, this variable receives the HTTP response headers.

OutFile=<filename>

Optional. The file to contain the received data. If this is present, Result returns the HTTP respnse headers.

Remarks

Both HTTP and FTP protocols are supported by this statement. To use FTP, simply replace the "http://" URL prefix with "ftp://".

See the example in XMLMatch for a more extensive example that includes a procedure for preparing HTTP GET arguments.

Example

InternetGet
URL="http://www.p1.com/index.html"
Result=P1HomePage
MessageBox Text=P1HomePage

The above script fragment displays the HTML content of the P1 Systems home page in a message box.



Prev | Next | Users Guide | PhantomScript Reference | P1 Systems

PhantomScript v1.7 Reference - Copyright © 2006 P1 Systems Incorporated. All Rights Reserved.