>-----Original Message-----
>From: John Edwards [mailto:[EMAIL PROTECTED]]

>
>
>How can I resolve a machine name from an IP address? The 
>machine that the
>script is running on is NT4.
>
>I've tried this (with use Socket qw(:DEFAULT :crlf); at the top of the
>script)
>
>$machine_name = gethostbyaddr(inet_aton($userIP), AF_INET) or 
>die "Can't
>resolve $userIP: $!\n"
>
>It works on the LAN, but not across a router to the remainder 
>of our WAN.
>Any ideas?


Drop into cmd and type

ping -a "IP ADDRESS"

Then parse the first line output to get the hotname of that PC. It should
come out like 

Pinging "HOSTNAME"  Ignore this.


Redirect the output of a system call or something to capture the output. I
have not tried it but it is what I would do.

H 


*************************************************************************************
COLT Telecommunications
Registered in England No. 2452736
Registered Office: Bishopsgate Court, 4 Norton Folgate, London E1 6DQ
Tel. +44 20 7390 3900

This message is subject to and does not create or vary any contractual
relationship between COLT Telecommunications, its subsidiaries or 
affiliates ("COLT") and you. Internet communications are not secure
and therefore COLT does not accept legal responsibility for the
contents of this message.  Any view or opinions expressed are those of
the author. The message is intended for the addressee only and its
contents and any attached files are strictly confidential. If you have
received it in error, please telephone the number above. Thank you.
*************************************************************************************


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to