I have a file called 94bf663a100e848fb599209af8cdc2b5.wmv. I know pathinfo
will not give me the extension if I just use the name 94bf663a100e848fb599209af8cdc2b5. I
The finfo_file() function will inspect the byte signature of a file to return its mimetype. From there, you can mostly deduce the correct file extension.
// Adapted from the PHP docs
$finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
echo finfo_file($finfo, $filename);
finfo_close($finfo);