Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #3834 > unrolled thread
| Started by | rrvasanth <vasanthaltimate@gmail.com> |
|---|---|
| First post | 2011-11-21 03:15 -0800 |
| Last post | 2011-11-22 14:08 +1100 |
| Articles | 12 — 7 participants |
Back to article view | Back to comp.lang.php
How to get client mac address in PHP ..? rrvasanth <vasanthaltimate@gmail.com> - 2011-11-21 03:15 -0800
Re: How to get client mac address in PHP ..? The Natural Philosopher <tnp@invalid.invalid> - 2011-11-21 11:36 +0000
Re: How to get client mac address in PHP ..? Jerry Stuckle <jstucklex@attglobal.net> - 2011-11-21 07:16 -0500
Re: How to get client mac address in PHP ..? Denis McMahon <denismfmcmahon@gmail.com> - 2011-11-21 16:18 +0000
Re: How to get client mac address in PHP ..? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-11-21 17:43 +0100
Re: How to get client mac address in PHP ..? Doug Miller <doug_at_milmacdotcom@example.com> - 2011-11-21 15:17 -0500
Re: How to get client mac address in PHP ..? Denis McMahon <denismfmcmahon@gmail.com> - 2011-11-21 21:54 +0000
Re: How to get client mac address in PHP ..? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-11-22 01:20 +0100
Re: How to get client mac address in PHP ..? Jerry Stuckle <jstucklex@attglobal.net> - 2011-11-21 22:14 -0500
Re: How to get client mac address in PHP ..? The Natural Philosopher <tnp@invalid.invalid> - 2011-11-22 09:28 +0000
Re: How to get client mac address in PHP ..? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-11-22 13:38 +0100
Re: How to get client mac address in PHP ..? Centurion <me@nowhere.example> - 2011-11-22 14:08 +1100
| From | rrvasanth <vasanthaltimate@gmail.com> |
|---|---|
| Date | 2011-11-21 03:15 -0800 |
| Subject | How to get client mac address in PHP ..? |
| Message-ID | <d7a53c7e-d222-4df1-95e8-f9602e6a2b85@w29g2000pri.googlegroups.com> |
Dear friends... I need to know the MAC address of the connect clients, how can I do this in PHP? Thanks Vasanth
[toc] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2011-11-21 11:36 +0000 |
| Message-ID | <jadd3u$a6n$1@news.albasani.net> |
| In reply to | #3834 |
rrvasanth wrote: > Dear friends... > > I need to know the MAC address of the connect clients, how can I do > this in PHP? > Try magic. The only mac address the server sees is that of its upstream Ethernet* router, at best. MAC addresses are purely Ethernet*. http://en.wikipedia.org/wiki/MAC_address *strictly MAC addresses also apply to other things like token ring etc, but who uses those these days? Your only hope is to ask the browser to supply it in a cookie using probably javascript or java, but I very much doubt the browser would actually bn able to tell what it was. And it would be trivial to fake it anyway. Which makes the final point, which is that there is zero purpose in having it at all in the first place. In short you want an impossible solution to a problem that has no purpose in the first place. > Thanks > Vasanth
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2011-11-21 07:16 -0500 |
| Message-ID | <jadfeg$l3q$1@dont-email.me> |
| In reply to | #3834 |
On 11/21/2011 6:15 AM, rrvasanth wrote: > Dear friends... > > I need to know the MAC address of the connect clients, how can I do > this in PHP? > > Thanks > Vasanth Sorry, it's not possible. It's not sent to your server. All you have available is the IP address. And it's possible the client may not even have a MAC address, i.e. a dial-up client would have the MAC address of the dial-up server (don't laugh - there are still a lot of these around the world). The real question is - what problem are you trying to solve? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2011-11-21 16:18 +0000 |
| Message-ID | <4eca79d7$0$28668$a8266bb1@newsreader.readnews.com> |
| In reply to | #3834 |
On Mon, 21 Nov 2011 03:15:12 -0800, rrvasanth wrote: > I need to know the MAC address of the connect clients, how can I do > this in PHP? You need a course in ethernet protocols. Then you'll understand why either (a) you can not need this information or (b) you have been given an impossible coding (or homework?) assignment. Rgds Denis McMahon
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2011-11-21 17:43 +0100 |
| Message-ID | <2742039.DBLsAHKzVh@PointedEars.de> |
| In reply to | #3844 |
Denis McMahon wrote: > On Mon, 21 Nov 2011 03:15:12 -0800, rrvasanth wrote: >> I need to know the MAC address of the connect clients, how can I do >> this in PHP? > > You need a course in ethernet protocols. You need to learn to spell "Ethernet" and understand what it is. > Then you'll understand why either (a) you can not need this information > or (b) you have been given an impossible coding (or homework?) assignment. It is neither irrelevant nor impossible to obtain that information using PHP. You would know that if you knew that MAC addresses do not require Ethernet. PointedEars -- > If you get a bunch of authors […] that state the same "best practices" > in any programming language, then you can bet who is wrong or right... Not with javascript. Nonsense propagates like wildfire in this field. -- Richard Cornford, comp.lang.javascript, 2011-11-14
[toc] | [prev] | [next] | [standalone]
| From | Doug Miller <doug_at_milmacdotcom@example.com> |
|---|---|
| Date | 2011-11-21 15:17 -0500 |
| Message-ID | <jaeblg$qrr$1@dont-email.me> |
| In reply to | #3845 |
On 11/21/2011 11:43 AM, Thomas 'PointedEars' Lahn wrote: > Denis McMahon wrote: > >> On Mon, 21 Nov 2011 03:15:12 -0800, rrvasanth wrote: >>> I need to know the MAC address of the connect clients, how can I do >>> this in PHP? >> >> You need a course in ethernet protocols. > > You need to learn to spell "Ethernet" and understand what it is. Oh, looky, a spelling fLame. > >> Then you'll understand why either (a) you can not need this information >> or (b) you have been given an impossible coding (or homework?) assignment. > > It is neither irrelevant nor impossible to obtain that information using > PHP. You would know that if you knew that MAC addresses do not require > Ethernet. > LMAO. How do you propose that he can do that? Hint: re-read the post above as many times as needed until you realize that the OP wrote "MAC address" and not "IP address".
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2011-11-21 21:54 +0000 |
| Message-ID | <4ecac87a$0$28438$a8266bb1@newsreader.readnews.com> |
| In reply to | #3847 |
On Mon, 21 Nov 2011 15:17:48 -0500, Doug Miller wrote: > On 11/21/2011 11:43 AM, Thomas 'PointedEars' Lahn wrote: >> Denis McMahon wrote: >> >>> On Mon, 21 Nov 2011 03:15:12 -0800, rrvasanth wrote: >>>> I need to know the MAC address of the connect clients, how can I do >>>> this in PHP? >>> >>> You need a course in ethernet protocols. >> >> You need to learn to spell "Ethernet" and understand what it is. > > Oh, looky, a spelling fLame. >> >>> Then you'll understand why either (a) you can not need this >>> information or (b) you have been given an impossible coding (or >>> homework?) assignment. >> >> It is neither irrelevant nor impossible to obtain that information >> using PHP. You would know that if you knew that MAC addresses do not >> require Ethernet. >> > LMAO. How do you propose that he can do that? > > Hint: re-read the post above as many times as needed until you realize > that the OP wrote "MAC address" and not "IP address". Actually, I would love to see TPEL code a web page that displayed the MAC address of any computer that requested it. However, it's impossible for him to do it! He does not have the ability to code such a page. He couldn't even manage it for the satisfaction of proving me wrong! I know that the only MAC address that appears on packets arriving at my web server on my lan are those of my router (when a page is requested from outside the lan), or other interfaces on the lan. Anything connected over wireless to the wap presents the wap MAC address to the rest of the lan. Of course, if the OPs application is hosted on a server using some other connection technology than ethernet, then my comments about ethernet might not apply, but to the best of my knowledge, most servers operate on ethernet connected hardware, and it's a fairly fundamental fact of ethernet networking that ethernet MAC addresses do not generally travel past media segment boundaries, such as routers and waps. Rgds Denis McMahon psst Thomas, prove me wrong, code a web page that displays the MAC address of the computer requesting the web page, and post the code to prove you did it in php. Because I say you can't do it!
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2011-11-22 01:20 +0100 |
| Message-ID | <1459459.lGe1XJ6QLU@PointedEars.de> |
| In reply to | #3848 |
Denis McMahon wrote: > On Mon, 21 Nov 2011 15:17:48 -0500, Doug Miller wrote: >> On 11/21/2011 11:43 AM, Thomas 'PointedEars' Lahn wrote: >>> Denis McMahon wrote: >>>> On Mon, 21 Nov 2011 03:15:12 -0800, rrvasanth wrote: >>>>> I need to know the MAC address of the connect clients, how can I do >>>>> this in PHP? >>>> […] >>> It is neither irrelevant nor impossible to obtain that information >>> using PHP. You would know that if you knew that MAC addresses do not >>> require Ethernet. > […] > Actually, I would love to see TPEL code a web page that displayed the MAC > address of any computer that requested it. However, it's impossible for > him to do it! "Any computer" and "web page" are ideas of yours that have nothing to do with the original question. > He does not have the ability to code such a page. Nobody has, but only because you have raised the bar. A common fallacy, but not an unexpected one coming from you. > psst Thomas, prove me wrong, code a web page that displays the MAC > address of the computer requesting the web page, and post the code to > prove you did it in php. Because I say you can't do it! Contrary to what you apparently imagine in your little idiot replacement of a brain, I do not care to satisfy your every whim just to prove that you are wrong. Hint: arp. PointedEars -- Danny Goodman's books are out of date and teach practices that are positively harmful for cross-browser scripting. -- Richard Cornford, cljs, <cife6q$253$1$8300dec7@news.demon.co.uk> (2004)
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2011-11-21 22:14 -0500 |
| Message-ID | <jaf43r$dtr$2@dont-email.me> |
| In reply to | #3849 |
On 11/21/2011 7:20 PM, Thomas 'PointedEars' Lahn wrote: > Denis McMahon wrote: > <snip> > > Contrary to what you apparently imagine in your little idiot replacement of > a brain, I do not care to satisfy your every whim just to prove that you are > wrong. Hint: arp. > > > PointedEars IOW, you have no idea how to do it. But you said it could be done. That's typical - all mouth and no brains.g It's not your ears that are pointed! But it does reside on top of your neck. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2011-11-22 09:28 +0000 |
| Message-ID | <jafq0b$ljv$1@news.albasani.net> |
| In reply to | #3849 |
Thomas 'PointedEars' Lahn wrote: > Denis McMahon wrote: > >> On Mon, 21 Nov 2011 15:17:48 -0500, Doug Miller wrote: >>> On 11/21/2011 11:43 AM, Thomas 'PointedEars' Lahn wrote: >>>> Denis McMahon wrote: >>>>> On Mon, 21 Nov 2011 03:15:12 -0800, rrvasanth wrote: >>>>>> I need to know the MAC address of the connect clients, how can I do >>>>>> this in PHP? >>>>> […] >>>> It is neither irrelevant nor impossible to obtain that information >>>> using PHP. You would know that if you knew that MAC addresses do not >>>> require Ethernet. >> […] >> Actually, I would love to see TPEL code a web page that displayed the MAC >> address of any computer that requested it. However, it's impossible for >> him to do it! > > "Any computer" and "web page" are ideas of yours that have nothing to do > with the original question. > >> He does not have the ability to code such a page. > > Nobody has, but only because you have raised the bar. A common fallacy, but > not an unexpected one coming from you. > >> psst Thomas, prove me wrong, code a web page that displays the MAC >> address of the computer requesting the web page, and post the code to >> prove you did it in php. Because I say you can't do it! > > Contrary to what you apparently imagine in your little idiot replacement of > a brain, I do not care to satisfy your every whim just to prove that you are > wrong. Hint: arp. > > which will reveal ONLY the nodes on the LOCAL directly connected network. In the case of many hosted servers, that will be an upstream router ONLY Once past a router, the MAC dress is lost. Hint: that's why we don't run the internet using MAC addresses for wide area routing. . > PointedEars
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2011-11-22 13:38 +0100 |
| Message-ID | <2017349.YEL58v44cs@PointedEars.de> |
| In reply to | #3852 |
The Natural Philosopher wrote: > Thomas 'PointedEars' Lahn wrote: >> Denis McMahon wrote: >>> On Mon, 21 Nov 2011 15:17:48 -0500, Doug Miller wrote: >>>> On 11/21/2011 11:43 AM, Thomas 'PointedEars' Lahn wrote: >>>>> Denis McMahon wrote: >>>>>> On Mon, 21 Nov 2011 03:15:12 -0800, rrvasanth wrote: >>>>>>> I need to know the MAC address of the connect clients, how can I do >>>>>>> this in PHP? >>>>>> […] >>>>> It is neither irrelevant nor impossible to obtain that information >>>>> using PHP. You would know that if you knew that MAC addresses do not >>>>> require Ethernet. >>> […] >>> Actually, I would love to see TPEL code a web page that displayed the >>> MAC address of any computer that requested it. However, it's impossible >>> for him to do it! >> >> "Any computer" and "web page" are ideas of yours that have nothing to do >> with the original question. >> >>> He does not have the ability to code such a page. >> >> Nobody has, but only because you have raised the bar. A common fallacy, >> but not an unexpected one coming from you. >> […] >> Hint: arp. > > which will reveal ONLY the nodes on the LOCAL directly connected > network. In the case of many hosted servers, that will be an upstream > router ONLY > > Once past a router, the MAC dress is lost. > > Hint: that's why we don't run the internet using MAC addresses for wide > area routing. > . It is good to see that at least one person got the meaning of my posting. There is hope for you yet. PointedEars -- Prototype.js was written by people who don't know javascript for people who don't know javascript. People who don't know javascript are not the best source of advice on designing systems that use javascript. -- Richard Cornford, cljs, <f806at$ail$1$8300dec7@news.demon.co.uk>
[toc] | [prev] | [next] | [standalone]
| From | Centurion <me@nowhere.example> |
|---|---|
| Date | 2011-11-22 14:08 +1100 |
| Message-ID | <9j0i0tFglU1@mid.individual.net> |
| In reply to | #3834 |
On 2011-11-21 11:15:12 +0000, rrvasanth said:
> Dear friends...
>
> I need to know the MAC address of the connect clients, how can I do
> this in PHP?
>
> Thanks
> Vasanth
30 seconds on Google turned up this:
http://forums.devarticles.com/general-programming-help-4/how-can-i-find-out-the-user-mac-address-1846.html
Be aware, the connecting client's MAC (Ethernet) address will only be
available *IF* that client is on the same broadcast domain as your
PHP/Web server. If they are on a different broadcast domain, you get
nothing.
Broadcast domain is best thought of as LAN/VLAN. In short, the moment
the packet pops up to layer 3 (ie, router/layer 3 switch) between
server and client, you're boned.
Suggest you get a good book on the OSI model and read up on Ethernet,
IP and the layer 4 family (UDP/TCP/etc).
--
James
Let a fool hold his tongue and he will pass for a sage.
-- Publilius Syrus
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web