Copyright (C) 2005 Fumio Kawamata.
Created on November 3, 2005. Last modified on December 29, 2005.
I can obtain one IP address from one hostname as below.
IPAddress:=GStack.ResolveHost(HostName, ID_DEFAULT_IP_VERSION);
Some host returns multiple IP addresses as below.
C:\>nslookup www.yahoo.co.jp Server: bind.dion.ne.jp Address: 210.196.3.183 Non-authoritative answer: Name: www.yahoo.co.jp Addresses: 202.93.91.218, 202.93.91.219, 202.229.198.216, 202.229.199.136, 202.229.199.147, 203.141.35.113, 210.80.242.236, 210.80.243.14, 210.81.3.241, 210.81.150.5, 202.93.91.214, 202.93.91.215, 202.93.91.216, 202.93.91.217
I did not know how I can obtain multiple IP addresses from one hostname. So, I asked at the atozedsoftware.indy.general newsgroup, news.atozedsoftware.com, and I could get the answer how to do that.
I have prepared this web page for the person who do not know how to do that yet. I hope this web page will help someone.
I used:
- Windows XP Professional Service Pack 2 (Japanese version)
- Delphi 6 Professional Update Pack 2 (Japanese version)
- Indy Version 10.0.52.
Source code of main unit(text file)
Archive file (Executable file and whole source codes) resolve100.zip (300,865 bytes)
Snap shot of the prgram