t = ResolveHostName(host$)
host$to an IP address. In contrast to the similar function ToIP(),
ResolveHostName()returns all information it can retrieve from the resolver in a table. This is especially useful if you need to get information about the available Internet protocols for the host name. Thus, this function can return multiple IP addresses for the specified host name, e.g. one IPv4 address and one IPv6 address.
ResolveHostName() returns a table which contains a number of subtables, one for
each IP address successfully resolved. Each of these subtables will have the
following fields initialized:
#IPV6is currently unsupported on AmigaOS and compatible systems.
t = ResolveHostName("www.airsoftsoftwair.de") For Local k = 0 To ListItems(t) - 1 Print(t[k].address, t[k].protocol) NextOn a Windows 10 system, the code above resolves two IP address for
www.airsoftsoftwair.de: One IPv4 address and one IPv6 address.