KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to get the IP address of a hostname
PRODUCT: 4D Internet Commands | VERSION: 2004.4 | PLATFORM: Mac & Win
Published On: August 25, 2006

You can get the IP address of a hostname provided using the command NET_Resolve of the 4D Internet Commands. Below is sample method that does this:

C_TEXT($1;$0)
C_TEXT($hostname;$IPHost)
C_LONGINT($err)
$hostname:=$1
$err:=NET_Resolve ($hostname;$IPHost)
$0:=$IPHost