Search
Filters
Close

OpenHTTP( )

=OpenHTTP() IP Tools for Excel Sheet Function to open and test HTTP pages
 

Check test and evaluate HTTP and HTTPS page status in Excel

 

  

OpenHTTP( )

Opens the specified URL header. Returns results and response time

=OpenHTTP(TargetURL, [ReturnType], [Port], [TimeOut], [FollowRedirect])

Arguments

TargetURL Required

Target URL. Must be absolute. The URI scheme http:// and https:// are supported. If the URI is omitted then http:// will be tried. That is if www.CheckTheNetwork.com were supplied then the TargetURL would become http://www.CheckTheNetowrk.com. Any TargetURL must be resolvable by DNS or host file else the return is #ipte_DNS-NORESOLVE

ReturnType Optional - default is 0

0  TrueFalse = TRUE/FALSE

If the TargetURL acknowledges the open request with a positive result then TRUE is returned else the return is FALSE. A positive result is any response status code class 2xx

1  Time = time in milliseconds

Time taken in milliseconds to receive the result from the TargetURL. The time for name resolutions is not included in the reported time. If the result fails -1 is returned. A failure is a non response from the TargetURL

2  ResultCode = response status code

Response status code returned from the TargetURL if it was reachable. If the TargetURL is not reachable the application may return its own status codes such as “No connection within timeout”

3  ResultString = response status string

Response status string returned from the TargetURL if it was reachable. If the TargetURL is not reachable the application may return its own status codes

99  FailureReason = error reason

Response status string returned from the TargetURL if it was reachable. If the TargetURL is not reachable the application may return its own status codes

Port Optional – default is 80

Integer value 1 to 65535. The TCP port number the request will open. TCP port number may be specified in the URL. If the argument Port is provided it will take precedence over any port specified in a URL

TimeOut Optional – default is 10

Integer value 1 to 25. Timeout value in seconds. The amount of time to wait for the result from the TargetURL before returning a timeout error

FollowRedirect Optional – default is FALSE

TRUE or FALSE. If TRUE and the request returns a redirect then the redirect will be honored and followed. If ReturnType is Time the time taken may include time for DNS resolution for a redirected Host

Usage Examples

=OpenHTTP(“http://www.google.com”)

Preforms an open on the TargetURL host www.google.com. Returns TRUE if the response status code is in the class success 200 to 299 else FALSE is returned

=OpenHTTP(“https://www.juniper.net/us/en/",1)

Performs an open on the TargerURL https://www.juniper.net/us/en/ Returns the time taken in milliseconds to receive the response

=OpenHTTP(“www.facebook.com/login.php”)

Performs an open on the TargetURL www.facebook.com/login.php. Because an absolute URL is not supplied http://www.facebook.com/login.php will be tried. The return will be FALSE because a response status code of 302 is returned

=OpenHTTP(“http://www.bing.com/”,2)

Performs an open on the TargetURL http://www.bing.com/ The return will be 200 if the URL is reachable

=OpenHTTP(“http://www.bing.com/”,3,1)

Performs an open on the TargetURL http://www.bing.com/ The return will be OK if the URL is reachable and responds within 1 second

Notes

Any argument can be a cell reference like A7 or $D$3

Arguments can be entered as “string” or number value

Default timeout for DNS resolution 1 second. The request is tried 1 time. If the supplied TargetHost cannot be resolved #ipte_DNS-NORESOLVE is returned

Top of Page