How to get visitors 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
User avatar
Calimero
Forum Contributor
Posts: 310
Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way

How to get visitors computer name

Post by Calimero »

What I need is to get a computer name from my visitor.
Not IP, Refferer, or User_agent(browser).

Only the name of the machine.

Thanks Ahead !
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The short answer: you can't.
User avatar
Calimero
Forum Contributor
Posts: 310
Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way

%$^&#$@(&$^%%^@) :(

Post by Calimero »

What !!! not even the all mighty, called upon as a last solution resort Apache sever doesn't have the function.

Thanks anyway.
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Thankfully, no.

You do realise only Windoze boxes actually have "computer names"?
PAW Projects
Forum Commoner
Posts: 30
Joined: Tue Jun 15, 2004 7:43 am
Contact:

Post by PAW Projects »

Yup.
The basic rule applies:
If the user doesn't send it to the server, the server doesn't know.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

only when you are on the same (local area) network could you determine the computers "name"
PAW Projects
Forum Commoner
Posts: 30
Joined: Tue Jun 15, 2004 7:43 am
Contact:

Post by PAW Projects »

Don't even coun on that either, though.
I believe only Internet Explorer sends that information.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

uh... the machine broadcasts it.
PAW Projects
Forum Commoner
Posts: 30
Joined: Tue Jun 15, 2004 7:43 am
Contact:

Post by PAW Projects »

So you're saying that Apache listens to see if the client is broadcasting stuff besides having sent the HTTP request header.....
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

im sure you could throw something together in php that would get the client ip and resolve it into a name over a windows network
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

PAW Projects wrote:So you're saying that Apache listens to see if the client is broadcasting stuff besides having sent the HTTP request header.....
no, NETBIOS information is a non-routable packet system. It only works on local networks.

we've talked about this before: http://www.devnetwork.net/forums/viewto ... puter+name
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

Wouldnt getting the computers name be a sort of hacking?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

there are legitimate uses for it in a windows networking environment. Outside of that, there is little real use for it.
PAW Projects
Forum Commoner
Posts: 30
Joined: Tue Jun 15, 2004 7:43 am
Contact:

Post by PAW Projects »

feyd wrote:no, NETBIOS information is a non-routable packet system. It only works on local networks.
I know how Netbios works, I was just wondering how (and why) Apache got hold of this.
Post Reply