Network.LookupIPAddress

From Xojo Documentation

Method

Network.LookupIPAddress(DNSAddress as String) As String

Supported for all project types and targets.

Looks up the passed DNS address and returns its IP address as a String.

Example

The following call returns the IP address for the wikipedia.org domain name.

Var s As String
s = System.Network.LookupIPAddress("wikipedia.org")
If s <> "" Then
MessageBox(s)
Else
MessageBox("An error occurred")
End If