A faster way I've found to return CRC values of larger files, is instead of using the file()/implode() method used below, is to us file_get_contents() (PHP 4 >= 4.3.0) which uses memory mapping techniques if supported by your OS to enhance performance. Here's my example function:
<?php
function file_crc($file)
{
$file_string = file_get_contents($file);
$crc = crc32($file_string);
return sprintf("%u", $crc);
}
$file_to_crc = /home/path/to/file.jpg;
echo file_crc($file_to_crc); ?>
I've found in testing this method is MUCH faster for larger binary files.