Check php.net...
You can do like this in *nix:
$result = exec("df");
Then, using regular expressions (preg/ereg functions), search for the volume, count the fields, and try to get the data that way. I wrote something we have in production here, but it's a holy mess, especially with linux because the empty fields register as nulls.
I honestly don't know of a DOS command that will get you the size of the hard disk as a whole... just the remaining size from like a DIR command.