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 ";