<?php $filename = "/path/to/file.jpg"; $kda = "/usr/bin/file $filename"; $out = `$kda`; echo $out; ?>