GIDForums  

Go Back   GIDForums > Computer Forums > Computer Software Forum - Windows
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 4.50 average.
  #1  
Old 21-Jul-2007, 22:30
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

Windows Command to find the hostname for an IP address


What is the Windows XP command, if any, to find the hostname for a given IP address?

I can do the reverse with `nslookup`:

Code:
C:\Documents and Settings\J>nslookup yumie.gidnetwork.com Server: cns3.tm.net.my Address: 202.188.0.133 Non-authoritative answer: Name: yumie.gidnetwork.com Address: 69.30.244.34

... but I don't know how to find the hostname if all I have is an IP address.
  #2  
Old 22-Jul-2007, 01:05
crystalattice's Avatar
crystalattice crystalattice is offline
Aspiring author
 
Join Date: Apr 2004
Location: Japan (again)
Posts: 1,671
crystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nice

Re: Windows Command to find the hostname for an IP address


The command is called reverse DNS lookup. If you want an Internet site, try this site: http://remote.12dt.com/.

According to this site (http://www.tech-faq.com/reverse-dns.shtml), your nslookup command should work just fine w/ the IP address. Otherwise just do Google search on reverse DNS (rDNS).
__________________
Start Programming with Python-A beginner's guide to programming and the Python language.

Interested in pen & paper role playing games from the "golden age" of gaming? Visit Old School Role-Playing Games
  #3  
Old 22-Jul-2007, 01:24
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Florina, Greece
Posts: 1,112
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough

Re: Windows Command to find the hostname for an IP address


You could give this a try,
www.php.net

Mark

A few more using different methods,
http://www.hcidata.info/host2ip.cgi
http://h30097.www3.hp.com/globus/hpc/ghba.html
http://www.softpedia.com/get/System/...Hostname.shtml
http://codebase.dbp-site.com/code/co...b-address-ip-3
__________________

"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs

Stories from the NICU Blog
  #4  
Old 22-Jul-2007, 02:20
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

Re: Windows Command to find the hostname for an IP address


Quote:
Originally Posted by crystalattice
...your nslookup command should work just fine w/ the IP address...

Yes, it works! I don't know why I didn't try it before posting. Thank you.

As for the links to online tools, I don't know why anyone would use a web site to get this information when there is a command like nslookup in your PC already.
  #5  
Old 22-Jul-2007, 05:51
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Florina, Greece
Posts: 1,112
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough

Re: Windows Command to find the hostname for an IP address


Quote:
Originally Posted by JdS
As for the links to online tools, I don't know why anyone would use a web site to get this information when there is a command like nslookup in your PC already.

Only the first list one is like that. The 2nd is code, 3rd a tool, and fourth is code (granted a form a basic) but using Winsock.

My money however was on the php.net link. I apologize for missing the target.
  #6  
Old 22-Jul-2007, 08:02
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

Re: Windows Command to find the hostname for an IP address


With PHP, the code to create a web page/tool like this is rather trivial e.g.

PHP Code:

<?php

if( isset($_GET['ip'])  &&  $_GET['ip'] )
{
    echo "IP: ", htmlspecialchars($_GET['ip']), " is ", gethostbyaddr($_GET['ip']), "\n";
}
?>


is pretty much all it takes!

All this time I have been using Linux's host command to get this information and it never occurred to me to figure out how to do this with Windows -- until today!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command & Conquer 95 under XP dexter Computer Software Forum - Games 42 20-Sep-2008 13:30
How do you find the return address in an array of integers? racermike1967 C Programming Language 2 07-Nov-2005 10:08
Pointer Usage in C++: Beginner to Advanced varunhome C++ Forum 0 19-Aug-2005 09:25
Cannot find a runtime error on a fltk app running on windows Frangar FLTK Forum 2 12-May-2005 11:38

Network Sites: GIDNetwork · GIDApp · GIDBlog · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 12:57.


vBulletin, Copyright © 2000 - 2014, Jelsoft Enterprises Ltd.