NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_addrbyhost(n) 5.0.0a naviserver "NaviServer Built-in Commands"

Name

ns_addrbyhost - Forward lookup a hostname to its IP address

Table Of Contents

Synopsis

Description

This command resolves a hostname to its IP address. If the hostname cannot be resolved, it throws an error.

COMMANDS

ns_addrbyhost ?-all? hostname

hostname Name of the hostname to be resolved into IP address. When the option -all is used, the function returns all resolved IP addresses for this host.

EXAMPLES

 % ns_addrbyhost -all www.aol.com
 205.188.18.208 205.188.19.16 64.12.107.131 64.12.21.3
 % ns_addrbyhost bogus.domain
 could not lookup bogus.domain

See Also

ns_hostbyaddr

Keywords

dns, global built-in