How to get serial number of php hard drive on localhost

Is there a way to get the serial number of the hard drive or the serial number of a machine with php or javascript on localhost ??

we can get it with the next command in cmd

wmic DISKDRIVE GET SerialNumber 

or machine serial number using this

 wmic bios get serialnumber 

maybe with php or javascript ?? something in php

 <?php echo DISKDRIVE GET SerialNumber //** some thing like this on local host ?> 

I need to give the Clint project on the local host, and I don't want anyone to access it on another computer (in php)

+2
javascript php hardware
source share
2 answers

Of course you can use

 shell_exec('wmic DISKDRIVE GET SerialNumber 2>&1') 

or

 shell_exec('wmic bios get serialnumber 2>&1') 

if wmic installed on the server and your PHP has permission to run it.

The part '2>&1' used from the sentence here .

+5
source share

impossblie. Nothing can break the browser sandbox, otherwise it will be a serious security problem.

The only option is through ActiveX, but you still need to sign and change IE settings. (no cross platform, not cross browser)

+2
source share

All Articles