we can get it with following command in cmd
wmic DISKDRIVE GET SerialNumber
wmic bios get serialnumber
echo DISKDRIVE GET SerialNumber //** some thing like this on local host
You can of course use
shell_exec('wmic DISKDRIVE GET SerialNumber 2>&1')
shell_exec('wmic bios get serialnumber 2>&1')
wmic is installed on server and your PHP has permission to run it.
'2>&1' part is used from the suggestion here.