The
disk_free_space() file system function in PHP will return the amount of bytes available in a disk partition or on a filesystem. Will also read a windows partition available disk space.
<?php
$freeSpace = disk_free_space("/");
echo "There are " . $freeSpace . " bytes of free space on filesystem";
?>
There are 54127882240 bytes of free space in filesystem