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

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


Networking

InternetHead

Syntax

InternetHead URL=<url> Headers=<hdrs> Result=<var>

Description

Performs an HTTP HEAD request, returning the HTTP header response.

Parameters

URL=<url>

The URL whose header is 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>

The variable into which the header data is to be placed

Remarks

Example

          Local hdrs = "User-Agent: PhantomForWindows~n" 
hdrs = hdrs & "Connection: Keep-Alive~n"
hdrs = hdrs & "X-MySpecialHeader: my-special-data~n"

InternetHead URL="http://www.p1.com" Headers=hdrs Result=head

MessageBox Text=head

The above script fragment displays the HTML header similar to that shown below:

  HTTP/1.1 200 OK
Date: Tue, 13 Jun 2006 04:42:21 GMT
Server: Apache/1.3.6 (Unix) FrontPage/4.0.4.3
Last-Modified: Sun, 20 Feb 2005 10:15:04 GMT
ETag: "7849-3d87-42186328"
Accept-Ranges: bytes
Content-Length: 15751
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html


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

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