HOST NAME statement

Purpose

Translate an IP address into a corresponding host name.

Syntax

HOST NAME [ip&] TO hostname$

Remarks

ip& is the IP address you want to look up.  If ip& is zero (0) or not specified, the name of the current computer is returned.  hostname$ receives the name of the host corresponding to the IP address.

In order to translate an IP address into an Internet domain name, your computer will need to be connected to a DNS server on the Internet or local Intranet.

See also

HOST ADDR, TCP and UDP CommunicationsTCP OPEN, UDP OPEN

Example

HOST ADDR "powerbasic.com" TO ip&

HOST NAME ip& TO hostname$

CALL ShowResult(hostname$, ip&)