Re: E-mail WAN IP Address

Giganews Newsgroups
Subject: Re: E-mail WAN IP Address
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Mon, 24 Oct 2005

"Jesse" <nospam@fake.com> wrote in message
news:9433285209DFE240nospam@fake.com...

> Because of the fact that my customer's IP address changes
> frequently, I want to create a function that will e-mail me their
> IP address on a daily basis.

Why not set up a free account withhttp://www.dyndns.org or similar service
instead?  That way, you can assign a static hostname to the customer that
will always point to the customer's current IP address automatically.

> I was wondering if there is an Indy component that will get
> their WAN IP address, so I can then e-mail that information.

Not for that specific purpose, no.  You can, however, use TIdHTTP to access
any of a number of websites that are designed for that purpose, such as
http://www.whatismyip.com orhttp://checkip.dyndns.org.

> I know that you can go to some web sites like whatismyip.com,
> and it'll tell you what your WAN IP is, but surely there are some
> other functions that can be run to take care of this.

Nope.  Not in Indy.  Not in the Win32 API either, for that matter.  Querying
an external service that reports the IP is the best way to get the WAN IP
address.

Gambit

Replies

In response to

E-mail WAN IP Address posted by Jesse on Sun, 23 Oct 2005