Simple file validation for PHP 5.1+ by reading the first n bytes of a file and comparing it to a (list of) file signature(s).