SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: MAC address

  1. #1
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MAC address

    Hi,

    is there is any way to get mac address of a system, if so could you please send the code.

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    MAC addresses do not exists on layer 3 networking protocols. I.e. the internet is a layer 3 protocol, Router <--to--> Router. That is why we use IP addressing.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is there is any work around to achieve it?

  4. #4
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Client program on the users computer the sends the MAC address with the request. Probably in a extended HTTP header.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  5. #5
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by divinequran View Post
    is there is any work around to achieve it?
    Depends. What do you need it for?

  6. #6
    Twitter: @TimIgoe silver trophy TimIgoe's Avatar
    Join Date
    Feb 2005
    Location
    Blackpool, UK
    Posts
    1,056
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    If you want the mac address of the machine your on, you could use the exec function to get at the data for the server.

    If you want the client mac address then your probably going to struggle.

  7. #7
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TimIgoe View Post
    If you want the client mac address then your probably going to struggle.
    Unless of course this is an intranet, then you could ask the DCHP server for the MAC address which matches the requesting IP.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  8. #8
    Twitter: @TimIgoe silver trophy TimIgoe's Avatar
    Join Date
    Feb 2005
    Location
    Blackpool, UK
    Posts
    1,056
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by SilverBulletUK View Post
    Unless of course this is an intranet, then you could ask the DCHP server for the MAC address which matches the requesting IP.
    If its internal, I guess you could make a call to ARP too to get the MAC address?

  9. #9
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply, logic_earth was right.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •