Sample code for 30+ languages & platforms
AutoIt

DNS Lookup

Do a DNS lookup to resolve a hostname to an IP address.

Chilkat AutoIt Downloads

AutoIt
; This example requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oSocket = ObjCreate("Chilkat.Socket")

Local $iMaxWaitMs = 10000
Local $sIpAddr = $oSocket.DnsLookup("www.chilkatsoft.com",$iMaxWaitMs)
If ($oSocket.LastMethodSuccess <> True) Then
    ConsoleWrite($oSocket.LastErrorText & @CRLF)
    Exit
EndIf

ConsoleWrite("IP Address: " & $sIpAddr & @CRLF)