954,323 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to get the Computername

Hai,
How can i get the Computername by Ping Command When i know the IP number.

(I.e) IP number 10.3.34.86

bk_raavi
Newbie Poster
10 posts since Oct 2003
Reputation Points: 10
Solved Threads: 0
 
GrimJack
Posting Maven
2,920 posts since Feb 2004
Reputation Points: 1,448
Solved Threads: 22
 

i think that finger will be adequat.
> finger 10.3.34.86

Swirler
Newbie Poster
9 posts since Jan 2004
Reputation Points: 10
Solved Threads: 1
 

Isn't finger a unix utility which gets info about the box's logged in users?

cscgal
The Queen of DaniWeb
Administrator
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
 

That is correct. Finger won't return the hostname.

Also, if you're attempting to get the hostname of a remote box, that could be considered an attempt to compromise the system (even if you aren't trying to actually DO that) and the new laws carry a penalty of life imprisonment for doing that.

There's also other ways to do what you're trying to do. The easiest is to have that person send you an e-mail, which will contain the originating hostname in the header of the message.

What exactly are you trying to do?

TheOgre
Posting Whiz
393 posts since Aug 2003
Reputation Points: 128
Solved Threads: 9
 
That is correct. Finger won't return the hostname.

Yes, your right, that's completly wrong :-| ...

Instead, TheOgre's solution is a good one. It is possible to get the hostname using a php function too ( $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); )... But it's not easier to make someone visit a web site than to make him send you a mail...
Here again, it depends of what you need to do exactly.

Swirler
Newbie Poster
9 posts since Jan 2004
Reputation Points: 10
Solved Threads: 1
 

I dont' think ping will do it
google is your friend
http://www.google.com/search?hl=en&...G=Google+Search >/>

I guess I was being too subtle; this search pointed to a page to find tools that might have but did not work/ Network-Tools.com being the easiest to use. I thought that if he put a little effort into his search he would learn something -- especially the pre-web tools we use to use. Don't you just love those tools: finger, whois, ping, lookup, daemon.

Anyway, looking around on that site would get you to this disclaimer:
Computer ('host') name or domain name? Normally, A domain name is not necessarily a 'host' name. For instance www.consumer.net and www2.consumer.net could be two different 'host' computers under the same domain. The computers could be separated and result in a completely different traceroute for each. A domain name, such as 'consumer.net,' may or may not be a 'host' or machine name depending on the configuration. 'Third level' or higher names, such as www.consumer.net are not registered except internally to the entity that owns the domain name.

This would not have answered the question but the asker might have learned something; I know I did -- give em an answer and point to where you got it, don't just point to where to look around to get the answer.

GrimJack

I do like this group

GrimJack
Posting Maven
2,920 posts since Feb 2004
Reputation Points: 1,448
Solved Threads: 22
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You