IP

Used to set or retrieve the IP address or host name.

Syntax

HTTPObject.IP

Where:

  • IP is a String (read/write)
Example

This script will re-use the same Object to connect to a different host and Send the same request:

Function Main

Dim HTTPObj As Object

ip1 = "www.gfi.com"

ip2 = "127.0.0.1"

port = 80

cr = Chr(13) + Chr(10)

Set HTTPobj = HTTP.Connect (ip1,port)

'Set up the request type

HTTPobj.GetURL("/")

'to pass through the proxy with automatic authentication

'Authentication needs to be set to 1

HTTPobj.Authentication = 1

'Send the GET request

HTTPResponse1 = HTTPobj.SendRequest ()

HTTPobj.IP = ip2

HTTPResponse2 = HTTPobj.SendRequest ()

echo "Result: " + CStr(HTTPResponse1)+cr

echo "Result: " + CStr(HTTPResponse2)+cr

End Function