There is an md5_file function in PHP