GetHostNames method

Populates an array with all host names used.

Syntax

nHosts = Server.GetHostNames( @aHosts )

Parameter

@aHosts

All host names used are returned to this array which was handed over by reference.  The array must exist prior to invocation.

Return value

The maximum number of host names possible, as a numerical value. In the unlimited AFP version this function will deliver undefined values and should therefore not be used. Since the unlimited version will not administer host names on principle, it is unable to return the host names used.

Remarks

If access to your website can be made via different names, the user call determines the host name to be used. The subsequent page will give you a list of all names that have already been defined. As this list includes all host names normalized through AFP you can easily discern which domain names constitute the same host name by AFP rules.

<%

  Local lnHost, laHost[1]

  For lnHost = 1 to Server.GetHostNames( @laHost )

    ? laHost[m.lnHost] + "<br>"

  Endfor

%>