I would like to read the last 1 megabyte of a MP3 file and calculate SHA1 checksum for just that part of the file. The reason that I would want this is that when I\'m looking fo
You'd have to use the c wrappers for file manipulation: fopen, fseek and fread:
$size = 1024 * 1000; $handle = fopen($file, 'r'); fseek($handle, -$size); $limitedContent = fread($handle, $size); $hash = md5($limitedContent);