SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: mac address

  1. #1
    SitePoint Addict kunal's Avatar
    Join Date
    Oct 2000
    Posts
    307
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mac address

    I have been trying to find out the mac address of a server using php... ive had no success till now.. anyone have any ideas on how to do this?
    i dunno...

  2. #2
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What exactly do you mean by "mac" address?

  3. #3
    SitePoint Addict Seer's Avatar
    Join Date
    May 2001
    Location
    Lyons, Colorado
    Posts
    391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's an identifier unique to an Ethernet Card, sorta like an IP I guess.. It's how the Ethernet routes the traffic from the network to a particular machine. MAC Address = Media Access Control. I don't know how you would be able to find this address for a machine, if I find out.. I'll pass it along.
    Everything has been figured out, except how to live. - Jean-Paul Sartre (1905-1980)

  4. #4
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP shouldn't have access to this, so I would think that you'd have to figure out some way to access it via an external program, then execute the program and load the output in PHP.

  5. #5
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Anarchos
    PHP shouldn't have access to this, so I would think that you'd have to figure out some way to access it via an external program, then execute the program and load the output in PHP.
    You can get the MAC addess with these commands:

    dmesg|grep eth_interface_name

    or

    ifconfig eth_interface_name

    And use regexps to find the MAC address.

  6. #6
    SitePoint Addict kunal's Avatar
    Join Date
    Oct 2000
    Posts
    307
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    arp -a.. should do it

    now its just the question of writing the lil shell script
    i dunno...


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
  •