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
Calimero
Forum Contributor
Posts: 310 Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way
Post
by Calimero » Tue Jun 15, 2004 5:38 pm
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 !
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Jun 15, 2004 5:41 pm
The short answer: you can't.
Calimero
Forum Contributor
Posts: 310 Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way
Post
by Calimero » Tue Jun 15, 2004 5:44 pm
What !!! not even the all mighty, called upon as a last solution resort Apache sever doesn't have the function.
Thanks anyway.
launchcode
Forum Contributor
Posts: 401 Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:
Post
by launchcode » Tue Jun 15, 2004 5:50 pm
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 » Tue Jun 15, 2004 5:55 pm
Yup.
The basic rule applies:
If the user doesn't send it to the server, the server doesn't know.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Jun 15, 2004 6:06 pm
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 » Wed Jun 16, 2004 3:38 am
Don't even coun on that either, though.
I believe only Internet Explorer sends that information.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Jun 16, 2004 3:53 am
uh... the machine broadcasts it.
PAW Projects
Forum Commoner
Posts: 30 Joined: Tue Jun 15, 2004 7:43 am
Contact:
Post
by PAW Projects » Wed Jun 16, 2004 8:02 am
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 » Wed Jun 16, 2004 8:05 am
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
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Jun 16, 2004 12:12 pm
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 » Wed Jun 16, 2004 12:21 pm
Wouldnt getting the computers name be a sort of hacking?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Jun 16, 2004 12:24 pm
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 » Wed Jun 16, 2004 4:31 pm
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.