Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show ip-address of a domain in a html page

Status
Not open for further replies.

ojf

Instructor
Sep 27, 2000
49
NO
Is it possible to find the ip-address of a domain and put it into a text box?

Say the domain is and the html-page is index.htm, then I want the ip-address of the domain to be placed in a text box of the index.htm.

Thanks!
 
Domains do not have IP addresses, so no - it is not possible to do what you ask.

If, however, you want to find the IP address of a machine on a domain (ftp.mydomain,com, mail.mydomain.com, etc), then you'd have to use some sort of server-side code (ASP, JSP, PHP, CGI, etc) to do this.

Hope this helps,
Dan
 
If your host doesn't support Perl/PHP/etc, you could stick a traceroute in your page..
Code:
<iframe src="[URL unfurl="true"]http://customers.hispeedhosting.com/cgi-bin/trace.sh?google.com"[/URL] height="50%" width="50%"></iframe>
Just replace google.com with whatever domain you need to look up. Not as pretty as what you want, but it's a start :\
 
ojf said:
Say the domain is and the html-page is index.htm, then I want the ip-address of the domain to be placed in a text box of the index.htm.

I'm a little confused here. Do you want the IP of the server that the index.htm page is sitting on or some totally different server?

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Thanks for your replies! I am interested in the ip of the server of the index.html. But I think that I have foun a solution, thanks to the program DynSite for Windows. The program monitors the IP and update it at but it also writes the IP into a file (ip.log) and I use the information in that file.

Before I found out that DynSite had this logging option, I put NSLOOKUP mydomain.net > c:\windows\web\ip.txt into a batch file, ip.bat and set up ip.bat to run as a scheduled task.

I have set up Remote Desktop Web Connection, and when I log on to the server, I have to supply the IP. When you install RDWC you get a file, default.htm. I renamed that file to default.asp and added some code so that it now reads the IP from ip.log and put it into the server text box. In that way I can reach my server (my home computer)here in Norway from around the world without having to worry about IP changes. And it works - after lots of trouble with ADSL modem, router, network card and of course Windows XP and all its fixes and updates.

Before I found out that DynSite had this logging option, I put NSLOOKUP mydomain.net > c:\windows\web\ip.txt into a batch file, ip.bat and set up ip.bat to run as a scheduled task. Then I filtered the ip.txt file in default.asp to get the valid ip adress into the server text box.
 
Hi mate,

Check out this FAQ, it shows some services that will provide a domain name you can use to access your server, it is much easier this way. [wink]

faq65-1879

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top