That should probably get a DNS name.
if you *know* all people connecting are connecting from a machine running MS
stuff, you
could in some cases get a bit more info with something catching the output
from
something like 'nbtstat -A $ENV{REMOTE_HOST}'... (ie in some LAN's it could
be not totally useless..)
If I remberber ok, Type <03> is the netbios name, but I'm not sure.
So somthing like this..
open(DOC,"nbtstat -A $ENV{REMOTE_HOST} | find \"<03>\" | ");
while(<DOC>) {
@fields=split(" ",$_);
print $fields[0];
}
close(DOC);
maybee could give the machinename...
(I'm not sure, but I think you can also get the usename from the locally
logged on user under certain conditions, I think if the machine is in a
'domain', but totally unsure about it)
Probably there's also lib's or so for getting the same..
Denie
----- Original Message -----
From: "Jenda Krynicky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 30, 2000 6:10 PM
Subject: Re: Getting Workstation Name
> > I'm wanting to trap the name of the workstation that hit my web page so
> > that I know who made a change. I can get the IP address by using the
> > $ENV{REMOTE_ADDR} environment variable, but with DHCP a user's IP
> > address could change. Is there a way using Perl to get that?
>
> Well, the name could be in $ENV{REMOTE_HOST}, but it's not
> guarantied. If you do not find it there you will have to do a reverse
> DNS lookup for the address in $ENV{REMOTE_ADDR}. (use Net::DNS :)
>
> Jenda
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web