// How to extract a file extension in PHP?
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$ext = substr(strrchr($filename, '.'), 1);
// http://stackoverflow.com/questions/173868/how-to-extract-a-file-extension-in-php
// http://www.cowburn.info/2008/01/13/get-file-extension-comparison/