Skip to content

Instantly share code, notes, and snippets.

Created May 19, 2016 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4b3617465bb590db8edd4c412d725875 to your computer and use it in GitHub Desktop.
Save anonymous/4b3617465bb590db8edd4c412d725875 to your computer and use it in GitHub Desktop.
mime types
php -r '
foreach ( glob("*.*") as $f ){
if ( !preg_match("/(aac|aif|au|3gp|mkv|vob|rm)\\z/", $f ) ) {continue; }; echo $f . " --> " . mime_content_type($f) . "\n";
}
'
AAC_8khz_Mono_5.aac --> audio/x-hx-aac-adts
M1F1-AlawC-AFsp.aif --> audio/x-aiff
anderson.au --> audio/basic
big_buck_bunny_144p_1mb.3gp --> video/3gpp
big_buck_bunny_720p_1mb.mkv --> video/x-matroska
sample.vob --> video/mpeg
video-anthem-rtr-october_2003-350kbps.rm --> application/vnd.rn-realmedia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment