hostname to IP address (udp)

Blitz3D Forums/Blitz3D Programming/hostname to IP address (udp)

UDP will only accept an integer IP (last I knew anyway), and theres no need to establish a TCP connection to get the IP (might not always be possible anyway):

Const HostName$="www.google.com"

a=CountHostIPs(HostName$)
Print HostName$+" has "+a+" IP addresses:"
For b=1 to a
	ip=HostIP(b)
	Print b+") "+DottedIP$(ip)+" or "+ip
Next

WaitKey
End