Sun Java System Web Proxy Server 4.0.2 2005Q4 Administration Guide

dnsDomainLevels(host)

The dnsDomainLevels() function finds the number of DNS levels (number of dots) in the URL host name.

Parameters:

host is the host name from the URL.

Returns:

number (integer) of DNS domain levels.

Examples:

dnsDomainLevels("www")

returns 0.

dnsDomainLevels("www.example.com")

returns 2.