Display Local Computer Name?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
twoclones
Forum Newbie
Posts: 2
Joined: Thu Apr 06, 2006 1:31 pm

Display Local Computer Name?

Post 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
User avatar
ambivalent
Forum Contributor
Posts: 173
Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON

Post by ambivalent »

This thread may be of interest: viewtopic.php?t=22130&highlight=psloggedon
twoclones
Forum Newbie
Posts: 2
Joined: Thu Apr 06, 2006 1:31 pm

Not what I want

Post 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
User avatar
ambivalent
Forum Contributor
Posts: 173
Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON

Post by ambivalent »

gethostbyaddr()

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