Jump to content

Client Details


canadabeeau

Recommended Posts

How can I get the MAC (Physical Network Address) of the computer visiting my website? I do remember seeing it done in JavaScript but now cant find the website (cant remember the name of it). Can anyone hlep, I need to display it on a php page, but I don't care how it is obtained and gets there.

 

Thanks in advance, any advice welcomed

Link to comment
Share on other sites

It's certainly not possible with PHP since it is client side information. PHP is server side and as such only has information sent to it in headers by the browser, the MAC address is most certainly not one of these things. It's also not to my knowledge possible via JavaScript directly. Since you say you wish to use it to validate a specific person, the method described in this article may be appropriate for you.

Link to comment
Share on other sites

the javascript will do it out..I am not an expert of javascript,but i got this for one of my programs

<!DOCTYPE  HTML  PUBLIC  "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
      <head>
            <title></title>
            <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
            <meta name="vs_targetSchema" content="http://schemas.
microsoft.com/intellisense/ie5">
            <script id="clientEventHandlersJS" language="javascript">
<!--

function Button1_onclick() {
      var locator = new ActiveXObject
"WbemScripting.SWbemLocator");
      var service = locator.ConnectServer(".");
      var properties = service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
      var e = new Enumerator (properties);
      document.write("<table border=1>");
      dispHeading();
      for (;!e.atEnd();e.moveNext ())
      {
            var p = e.item ();
            document.write("<tr>");
            document.write("<td>" + p.Caption + "</td>");
            document.write("<td>" + p.IPFilterSecurityEnabled + "</td>");
            document.write("<td>" + p.IPPortSecurityEnabled + "</td>");
            document.write("<td>" + p.IPXAddress + "</td>");
            document.write("<td>" + p.IPXEnabled + "</td>");
            document.write("<td>" + p.IPXNetworkNumber + "</td>");
            document.write("<td>" + p.MACAddress + "</td>");
            document.write("<td>" + p.WINSPrimaryServer + "</td>");
            document.write("<td>" + p.WINSSecondaryServer + "</td>");
            document.write("</tr>");
      }
      document.write("</table>");
}

function dispHeading()
{
      document.write("<thead>");
      document.write("<td>Caption</td>");
      document.write("<td>IPFilterSecurityEnabled</td>");
        document.write("<td>IPPortSecurityEnabled</td>");
        document.write("<td>IPXAddress</td>");
      document.write("<td>IPXEnabled</td>");
      document.write("<td>IPXNetworkNumber</td>");
      document.write("<td>MACAddress</td>");
      document.write("<td>WINSPrimaryServer</td>");
      document.write("<td>WINSSecondaryServer</td>");
      document.write("</thead>");
}

//-->
            </script>
      </head>
      <body>
            <INPUT id="Button1" type="button" value="Button" 
name="Button1" language="javascript" onclick="return Button1_onclick()">
      </body>
</html>

 

try this in IE 7 or 6,,

in ie 8 it might not work..

Link to comment
Share on other sites

There is no way short of giving the person something to identify themselves. In theory you can do it with a cookie. Just assign a unique value to that person using a cookie and you know it's almost certainly them.

Link to comment
Share on other sites

The only known ways of getting the MAC address is if you install a 'helper' application on the client.

 

Either an Active X Object (which is essentially what  ym_chaitu posted) or a Java applet (not to be confused with Javascript) (requires the Java VM to be installed on the client as well in order to run the Java applet.)

 

Why exactly do you need a fool proof unique identifier, because you cannot install own application that you create to do this, an Active X Object, or a Java applet/Java VM on a client without their interaction and approval.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.