Thanks for the tips guys. 

Arno, that code works flawlessly.

Steve Gaskin
ProLink/BK On-Line/Website
Dealer Marketing Services, Inc
5401 Elmore Avenue
Davenport, IA 52807
Phone: (563) 344-7612
Fax: (563) 344-7728
Email: [EMAIL PROTECTED]
 
----------------------------------------------------------------------------

This email may contain confidential & privileged material for the sole use
of the intended recipient.  Any review or distribution by others is strictly
prohibited.  If you are not the intended recipient please contact the sender
and delete all copies.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Arno Garrels
Sent: Friday, July 07, 2006 2:48 AM
To: Borland's Delphi Discussion List
Subject: Re: Getting an IP Address from a domain name


Hello Steve,

> to be a pain.  I need to get the Host IP from a domain name, IE - 
> www.skpontiac.com to 12.163.44.20

I don't know how it is done in Indy. But in ICS it is as simple as dropping
a TWSocket on the form and writing a few lines.

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.

Arno Garrels

_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://www.elists.org/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://www.elists.org/mailman/listinfo/delphi

Reply via email to