Hey

Does any1 know how to get the MAC address using PHP?

I want to write a code to compare the MAC address of the computer the user signs from and compare it with a MAC address hardcoded in the program.

Can some1 help me with this code?

Thanks in advance,

mishmia

    Search the forum. You'll find a lot of this question answered with "it can't purely be done with php". You need an external program to execute from php.

      I'm re-reading your original request and see that you're asking for the MAC address of the client. For some reason, I was thinking that you wanted the MAC address of the server running PHP... that's why I asked whether it was Windows or Linux.

      Anyway... PHP is not for client side. There are some environement variables that you can grab from the Web server (such as the client's browser type, IP address, etc.) but to my knowledge, the MAC address isn't one of them.

      As LordShryku stated in his post: "it can't purely be done with php". You would need a program to execute on the client side, grab the client's MAC address, assign that to a variable which could be fed to a PHP script.

        Actually, there are some progams you can run from the server to do it. You just have to look around. Then you can cal that program from php with one of the [man]exec[/man]ution functions.

          I'm always interested in learning new ways to solve a problem... do you have some URLs of products? These are ones that you've tried personally, or aware exists on the market?

            Not off the top of my head. I remember seeing this question maybe a year or so ago, and dug around for some tools. Came across some that worked pretty good. Lemme dig around again, and I'll post back what I find.

              Write a Reply...