Mnemorable

  • I love those who can smile in trouble, who can gather strength from distress, and grow brave by reflection. 'Tis the business of little minds to shrink, but they whose heart is firm, and whose conscience approves their conduct, will pursue their principles unto death. - [Leonardo da Vinci]
  • Standing on the Shoulder of Giants - One who develops future intellectual pursuits by understanding the research and works created by notable thinkers of the past.
  • A hundred times every day I remind myself that my inner and outer life are based on the labors of other men, living and dead, and that I must exert myself in order to give in the same measure as I have received and am still receiving... - [Albert Einstein]

Tuesday, October 14, 2008

Getting an IP Address from a domain name

[Source]

procedure TForm1.Button1Click(Sender: TObject);
begin
WSocket1.OnDnsLookupDone := WSocket1DnsLookupDone;
WSocket1.DnsLookup('www.skpontiac.com');
end;

procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: Word);
begin
if ErrCode = 0 then
Memo1.Lines.AddStrings(WSocket1.DnsResultList)
else
Memo1.Lines.Add(WSocket.WSocketErrorDesc(ErrCode))
end;

The ICS (Internet Component Suite, freeware) is available on the partner CD
or downloadable here
http://www.overbyte.be.