Getting Serial Number of the Hard Drive Provided by the manufacturer through PHP : How can it be done? I want to store it in a file.
OS : windows 2000,XP,ME,Vista.
You can use
$hdserial =`wmic DISKDRIVE GET SerialNumber 2>&1`
or
$hdserial =`wmic bios get serialnumber 2>&1`
Then you can echo it.
Based on Patrick Daryll Glandien's hint, you can execute following on *nix based machines.
$hdserial= hdparm -I /dev/hda
hdparm -i /dev/sda
returns lesser info. But as hdparm needs root access, it did not run with php for me.
The '2>&1' part is used from the suggestion here.