ipaddress

The ipaddress() function returns the IP address of the machine that is specified by hostname. hostname should be a fully qualified machine name.

result = ipaddress (hostname);

hostname Required. A fully qualified host name.

result contains the IP address of the specified machine. If the IP address cannot be determined, a blank string is returned (that is, length = 0).

result = ipaddress (hostname);

In this example, result contains the IP address of the machine specified in hostname.