Homer said:
Nope. I know it's cheap but is not free.
And my code is working. I just want to make it better. I can even put
some code in my Hosting server to return my IP address instead of using
whatismyip.com.
I have created another solution that works pretty well, and it is entirely
self-contained (ie, no third-party software or fees).
I have a small program running on my home server (Sun Netra). It's actually
two threads: one is a mini-server, which listens on a local port; the other
will access that port every few minutes, at my last known IP address, asking
for a magic number. If the magic number is wrong, or there's no response
from the mini-server, then the IP must have changed, so the program will
then access a CGI script on my remote (paid-for) website. That CGI script
will extract my home IP from the request header, and save it to a file. It
will also return the IP address back to my home server, where it will be
saved to my "last known IP" file. So now my home IP is saved at both ends.
It gets better. I have another CGI script on my remote web-site, which acts
as another mini-server. When this one is accessed, it will open a
connection to my home server (it has the IP address, remember!), and will
pass the query portion of the request to the home server, where it will be
passed to Tomcat, which creates HTML from a mixture of JSP and Servlets.
And because the home server also knows the home IP, it can plug that IP
address into the newly-created pages. What this means in practice is that I
can create content which contains references to images (for example) that
are on my home machine. The address bar in the browser still points at my
remote website, while some (or all) of the content is here at home. And
even if my IP changes, the generated pages will always contain the correct
IP.