Convert DN to IP address

Blitz3D Forums/Blitz3D Beginners Area/Convert DN to IP address

Chuck(Posted 2004) [#1]
Is there a Blitz function to obtain the IP address of a Domain Name ?

For Example
Whatever.net --> 123.456.789.2


Jeremy Alessi(Posted 2004) [#2]
What purpose do you need that for? You can connect to a domain name using HTTP and feed/get information to scripts etc... Look at GNet in the Toolbox.

http://www.blitzbasic.com/toolbox/toolbox.php?tool=61


Chuck(Posted 2004) [#3]
I need to be able to connect to a server directly using the domain names. So I need to have a function that would convert the domain name supplied into a valid ip address so the client would connect to the server. I need to not be able to rely on someone else's server to get from the client to the game server. How can this be achieved in Blitz ?


skidracer(Posted 2004) [#4]
Print CountHostIPs ("google.com")
Print DottedIP(HostIP(1))
Input



Chuck(Posted 2004) [#5]
Many Thanks...