Ask the PHP website to obtain the MAC address of the client

Source: Internet
Author: User
Ask the PHP website to obtain the MAC address of the client. now there is a PHP website. if you want to obtain the MAC address of the client, which of the following solutions does anyone have? please tell me, thank you. ------ Solution --------------------.................. This is impossible. You can only obtain the IP address and browser information of the client. MAC address cannot be obtained, unless you have the client security control ...... ------ Solution-how to obtain the MAC address of the client from a PHP website
I have a PHP website. I want to obtain the customer's MAC address. Which of the following solutions does Danale have? please tell me, thank you.
------ Solution --------------------
..................

This is impossible.

You can only obtain the IP address and browser information of the client.

MAC address cannot be obtained, unless you have the client security control ......
------ Solution --------------------
Unless the execution segment is obtained by bat or shell scripts
------ Solution --------------------
Run the exec command.
------ Solution --------------------
This is the best method for users to input data by themselves.
------ Solution --------------------
You have a method. remember to post it.
------ Solution --------------------
Define ('exec _ TMP_DIR ', 'C: \ WINDOWS \ Temp ');

Function windExec ($ cmd, $ mode = ''){

$ Cmdline = "cmd/C $ cmd ";
If ($ mode = 'fg '){
$ Outputfile = EXEC_TMP_DIR. "\". time (). ". txt ";
$ Response line. = "> $ outputfile ";
$ M = true;
}
Else $ m = false;


$ WshShell = new COM ("WScript. Shell ");
$ OExec = $ WshShell-> Run ($ cmdline, 0, $ m );

If ($ outputfile ){
$ RetStr = file_get_contents ($ outputfile );
Unlink ($ outputfile );
}
Else $ retStr = "";

Return $ retStr;

}

Echo windExec ('ipconfig/all', 'fg ');

This window XP works. I have already tested it. it works on my machine. I think windows can be changed, but the location of the temp file may be different.
------ Solution --------------------
Define ('exec _ TMP_DIR ', 'C: \ WINDOWS \ Temp ');

Function windExec ($ cmd, $ mode = ''){

$ Cmdline = "cmd/C $ cmd ";
If ($ mode = 'fg '){
$ Outputfile = EXEC_TMP_DIR. "\". time (). ". txt ";
$ Response line. = "> $ outputfile ";
$ M = true;
}
Else $ m = false;


$ WshShell = new COM ("WScript. Shell ");
$ OExec = $ WshShell-> Run ($ cmdline, 0, $ m );

If ($ outputfile ){
$ RetStr = file_get_contents ($ outputfile );
Unlink ($ outputfile );
}
Else $ retStr = "";

Return $ retStr;

}

Echo windExec ('ipconfig/all', 'fg ');
On my machine, we can estimate that windows can be used. I just want to change the location of the temp file.
------ Solution --------------------
Reference:
Define ('exec _ TMP_DIR ', 'C: \ WINDOWS \ Temp ');

Function windExec ($ cmd, $ mode = ''){

$ Cmdline = "cmd/C $ cmd ";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.