1

Possible Duplicate:
How can I get the MAC and the IP address of a connected client in PHP?

Hi everybody

In my website client's requirement is to getting IP address as well as MAC address and PC Name of visitor's machine.

For IP address no problem I have done.

But What for MAC address and PC Name?

Can we get it via PHP programatically ?

If it is possible, can you tell me how to do that?

Please suggest me something about it.

Community
  • 1
  • 1
  • 2
    That's only even remotely possible if you're talking about a small intranet situation. – deceze Apr 26 '11 at 06:24
  • 2
    You can't get the MAC address of the client PC directly from PHP, because it isn't sent by the browser, and PHP doesn't run on the client. You'd need to find a 3rd party library that could be run directly on the client to do this, and even then it could still only be run with permission. – Mark Baker Apr 26 '11 at 06:25
  • And which 'name'? NetBIOS? DNS? WINS? – Quentin Apr 26 '11 at 06:26

2 Answers2

2

Generate a HTML form that asks the user (using normal INPUT elements) what their MAC address and machine name are, and write a PHP script that will capture the submission and insert the data in the appropriate location.

In other words, no.

Ignacio Vazquez-Abrams
  • 699,552
  • 132
  • 1,235
  • 1,283
0

Not tested but this might help:- http://nazmulb.wordpress.com/2008/07/04/getting-mac-address-using-php/

This script is for getting server's mac address. I don't think it is possible to get clients mac address through php.

Mukesh Chapagain
  • 22,983
  • 12
  • 108
  • 114