Page 1 of 1

Display Local Computer Name?

Posted: Thu Apr 06, 2006 1:37 pm
by twoclones
Can I use PHP to display a local computer's name on a web page? What I want is to set the Intranet default page to display each computer's name on the network... How?


Butch

Posted: Thu Apr 06, 2006 2:18 pm
by ambivalent
This thread may be of interest: viewtopic.php?t=22130&highlight=psloggedon

Not what I want

Posted: Fri Apr 07, 2006 1:09 pm
by twoclones
I dont really want to ad more tools to the server. Since the command line *hostname* would give me exactly what I want, I'd think PHP would have a similar command. Can't seem to find it though....



Butch

Posted: Fri Apr 07, 2006 1:39 pm
by ambivalent
gethostbyaddr()

In a Microsoft intranet environment it returns something like computername.corp.domain.com. YMMV