Hi,
The Gethostbyname function resolves a hostname to an ip address. Is there a function available to convert an ip address to a hostname?
Thanks,
Alex
Reverse dns lookup
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Alex,
Try this:
James
Try this:
Code: Select all
if WsaStartup()=0
cServerName := "mail.infovia.com.ar"
cServerIP := GetHostByName(cServerName)
WsaCleanup()
else
Some kind of error
endif
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
www.google.com resolves to 192.220.116.62, which resolves back to e4001.webcom.comRF wrote:Enrico:
Now I just wondering, what this function will return, if several domains are pointing to the same IP Address, for example with the hosting companies, they used to have a single IP and many domains hosted on them. At least is what happen to us ?
I guess it's the owner of the ip address that decides what gets published for its reverse dns.
Alex