ФорумПрограммированиеPHP для идиотов → mime типы, кому нужно забирайте

mime типы, кому нужно забирайте

  • AlexanderC

    Сообщения: 270 Репутация: N Группа: Кто попало

    Spritz 26 августа 2011 г. 19:07

    подумал может кому-то пригодится….


    $mimeTypes = = array(
    'stl' => 'application/SLA',
    'step' => 'application/STEP',
    'stp' => 'application/STEP',
    'dwg' => 'application/acad',
    'ez' => 'application/andrew-inset',
    'ccad' => 'application/clariscad',
    'drw' => 'application/drafting',
    'tsp' => 'application/dsptype',
    'dxf' => 'application/dxf',
    'xls' => 'application/vnd.ms-excel',
    'unv' => 'application/i-deas',
    'jar' => 'application/java-archive',
    'hqx' => 'application/mac-binhex40',
    'cpt' => 'application/mac-compactpro',
    'pot' => 'application/vnd.ms-powerpoint',
    'pps' => 'application/vnd.ms-powerpoint',
    'ppt' => 'application/vnd.ms-powerpoint',
    'ppz' => 'application/vnd.ms-powerpoint',
    'doc' => 'application/msword',
    'bin' => 'application/octet-stream',
    'class' => 'application/octet-stream',
    'dms' => 'application/octet-stream',
    'exe' => 'application/x-msdos-program',
    'lha' => 'application/octet-stream',
    'lzh' => 'application/octet-stream',
    'oda' => 'application/oda',
    'ogg' => 'application/ogg',
    'ogm' => 'application/ogg',
    'pdf' => 'application/pdf',
    'pgp' => 'application/pgp',
    'ai' => 'application/postscript',
    'eps' => 'application/postscript',
    'ps' => 'application/postscript',
    'prt' => 'application/pro_eng',
    'rtf' => 'text/rtf',
    'set' => 'application/set',
    'smi' => 'application/smil',
    'smil' => 'application/smil',
    'sol' => 'application/solids',
    'vda' => 'application/vda',
    'mif' => 'application/x-mif',
    'xlc' => 'application/vnd.ms-excel',
    'xll' => 'application/vnd.ms-excel',
    'xlm' => 'application/vnd.ms-excel',
    'xlw' => 'application/vnd.ms-excel',
    'cod' => 'application/vnd.rim.cod',
    'arj' => 'application/x-arj-compressed',
    'bcpio' => 'application/x-bcpio',
    'vcd' => 'application/x-cdlink',
    'pgn' => 'application/x-chess-pgn',
    'cpio' => 'application/x-cpio',
    'csh' => 'application/x-csh',
    'deb' => 'application/x-debian-package',
    'dcr' => 'application/x-director',
    'dir' => 'application/x-director',
    'dxr' => 'application/x-director',
    'dvi' => 'application/x-dvi',
    'pre' => 'application/x-freelance',
    'spl' => 'application/x-futuresplash',
    'gtar' => 'application/x-gtar',
    'gz' => 'application/x-gzip',
    'hdf' => 'application/x-hdf',
    'ipx' => 'application/x-ipix',
    'ips' => 'application/x-ipscript',
    'js' => 'application/x-javascript',
    'skd' => 'application/x-koan',
    'skm' => 'application/x-koan',
    'skp' => 'application/x-koan',
    'skt' => 'application/x-koan',
    'latex' => 'application/x-latex',
    'lsp' => 'application/x-lisp',
    'scm' => 'application/x-lotusscreencam',
    'bat' => 'application/x-msdos-program',
    'com' => 'application/x-msdos-program',
    'cdf' => 'application/x-netcdf',
    'nc' => 'application/x-netcdf',
    'pl' => 'application/x-perl',
    'pm' => 'application/x-perl',
    'php' => 'application/x-php',
    'inc' => 'application/x-php',
    'phps' => 'application/x-httpd-php-source',
    'phar' => 'application/x-php-archive',
    'rar' => 'application/x-rar-compressed',
    'sh' => 'application/x-sh',
    'shar' => 'application/x-shar',
    'swf' => 'application/x-shockwave-flash',
    'sit' => 'application/x-stuffit',
    'sv4cpio' => 'application/x-sv4cpio',
    'sv4crc' => 'application/x-sv4crc',
    'tar.gz' => 'application/x-tar-gz',
    'tgz' => 'application/x-tar-gz',
    'tar' => 'application/x-tar',
    'tcl' => 'application/x-tcl',
    'tex' => 'application/x-tex',
    'texi' => 'application/x-texinfo',
    'texinfo' => 'application/x-texinfo',
    'man' => 'application/x-troff-man',
    'me' => 'application/x-troff-me',
    'ms' => 'application/x-troff-ms',
    'roff' => 'application/x-troff',
    't' => 'application/x-troff',
    'tr' => 'application/x-troff',
    'ustar' => 'application/x-ustar',
    'src' => 'application/x-wais-source',
    'zip' => 'application/zip',
    'tsi' => 'audio/TSP-audio',
    'au' => 'audio/ulaw',
    'snd' => 'audio/basic',
    'kar' => 'audio/midi',
    'mid' => 'audio/midi',
    'midi' => 'audio/midi',
    'mp2' => 'video/mpeg',
    'mp3' => 'audio/mpeg',
    'mpga' => 'audio/mpeg',
    'aif' => 'audio/x-aiff',
    'aifc' => 'audio/x-aiff',
    'aiff' => 'audio/x-aiff',
    'm3u' => 'audio/x-mpegurl',
    'wax' => 'audio/x-ms-wax',
    'wma' => 'audio/x-ms-wma',
    'rpm' => 'audio/x-pn-realaudio-plugin',
    'ram' => 'audio/x-pn-realaudio',
    'rm' => 'audio/x-pn-realaudio',
    'ra' => 'audio/x-realaudio',
    'wav' => 'audio/x-wav',
    'pdb' => 'chemical/x-pdb',
    'xyz' => 'chemical/x-pdb',
    'ras' => 'image/x-cmu-raster',
    'gif' => 'image/gif',
    'ief' => 'image/ief',
    'jpe' => 'image/jpeg',
    'jpeg' => 'image/jpeg',
    'jpg' => 'image/jpeg',
    'png' => 'image/png',
    'tif' => 'image/tiff',
    'tiff' => 'image/tiff',
    'pnm' => 'image/x-portable-anymap',
    'pbm' => 'image/x-portable-bitmap',
    'pgm' => 'image/x-portable-graymap',
    'ppm' => 'image/x-portable-pixmap',
    'rgb' => 'image/x-rgb',
    'xbm' => 'image/x-xbitmap',
    'xpm' => 'image/x-xpixmap',
    'xwd' => 'image/x-xwindowdump',
    'iges' => 'model/iges',
    'igs' => 'model/iges',
    'mesh' => 'model/mesh',
    'msh' => 'model/mesh',
    'silo' => 'model/mesh',
    'vrml' => 'x-world/x-vrml',
    'wrl' => 'model/vrml',
    'css' => 'text/css',
    'htm' => 'text/html',
    'html' => 'text/html',
    'asc' => 'text/plain',
    'txt' => 'text/plain',
    'c' => 'text/plain',
    'cc' => 'text/plain',
    'f90' => 'text/plain',
    'f' => 'text/plain',
    'h' => 'text/plain',
    'hh' => 'text/plain',
    'm' => 'text/plain',
    'rtx' => 'text/richtext',
    'sgm' => 'text/sgml',
    'sgml' => 'text/sgml',
    'tsv' => 'text/tab-separated-values',
    'jad' => 'text/vnd.sun.j2me.app-descriptor',
    'etx' => 'text/x-setext',
    'xml' => 'text/xml',
    'dl' => 'video/dl',
    'fli' => 'video/x-fli',
    'flv' => 'video/flv',
    'gl' => 'video/gl',
    'mpe' => 'video/mpeg',
    'mpeg' => 'video/mpeg',
    'mpg' => 'video/mpeg',
    'mov' => 'video/quicktime',
    'qt' => 'video/quicktime',
    'viv' => 'video/vnd.vivo',
    'vivo' => 'video/vnd.vivo',
    'asf' => 'video/x-ms-asf',
    'asx' => 'video/x-ms-asx',
    'wmv' => 'video/x-ms-wmv',
    'wmx' => 'video/x-ms-wmx',
    'wvx' => 'video/x-ms-wvx',
    'avi' => 'video/x-msvideo',
    'movie' => 'video/x-sgi-movie',
    'mime' => 'www/mime',
    'ice' => 'x-conference/x-cooltalk',
    'vrm' => 'x-world/x-vrml',
    '3dm' => 'x-world/x-3dmf',
    '3dmf' => 'x-world/x-3dmf',
    'a' => 'application/octet-stream',
    'aab' => 'application/x-authorware-bin',
    'aam' => 'application/x-authorware-map',
    'aas' => 'application/x-authorware-seg',
    'abc' => 'text/vnd.abc',
    'acgi' => 'text/html',
    'afl' => 'video/animaflex',
    'aim' => 'application/x-aim',
    'aip' => 'text/x-audiosoft-intra',
    'ani' => 'application/x-navi-animation',
    'aos' => 'application/x-nokia-9000-communicator-add-on-software',
    'aps' => 'application/mime',
    'arc' => 'application/octet-stream',
    'art' => 'image/x-jg',
    'asm' => 'text/x-asm',
    'asp' => 'text/asp',
    'avs' => 'video/avs-video',
    'bm' => 'image/bmp',
    'bmp' => 'image/x-windows-bmp',
    'boo' => 'application/book',
    'book' => 'application/book',
    'boz' => 'application/x-bzip2',
    'bsh' => 'application/x-bsh',
    'bz' => 'application/x-bzip',
    'bz2' => 'application/x-bzip2',
    'c++' => 'text/plain',
    'cat' => 'application/vnd.ms-pki.seccat',
    'cco' => 'application/x-cocoa',
    'cer' => 'application/x-x509-ca-cert',
    'cha' => 'application/x-chat',
    'chat' => 'application/x-chat',
    'conf' => 'text/plain',
    'cpp' => 'text/x-c',
    'crl' => 'application/pkix-crl',
    'crt' => 'application/x-x509-user-cert',
    'cxx' => 'text/plain',
    'deepv' => 'application/x-deepv',
    'def' => 'text/plain',
    'der' => 'application/x-x509-ca-cert',
    'dif' => 'video/x-dv',
    'dot' => 'application/msword',
    'dp' => 'application/commonground',
    'dump' => 'application/octet-stream',
    'dv' => 'video/x-dv',
    'dwf' => 'model/vnd.dwf',
    'el' => 'text/x-script.elisp',
    'elc' => 'application/x-elc',
    'env' => 'application/x-envoy',
    'es' => 'application/x-esrehber',
    'evy' => 'application/x-envoy',
    'f77' => 'text/x-fortran',
    'fdf' => 'application/vnd.fdf',
    'fif' => 'image/fif',
    'flo' => 'image/florian',
    'flx' => 'text/vnd.fmi.flexstor',
    'fmf' => 'video/x-atomic3d-feature',
    'for' => 'text/x-fortran',
    'fpx' => 'image/vnd.net-fpx',
    'frl' => 'application/freeloader',
    'funk' => 'audio/make',
    'g' => 'text/plain',
    'g3' => 'image/g3fax',
    'gsd' => 'audio/x-gsm',
    'gsm' => 'audio/x-gsm',
    'gsp' => 'application/x-gsp',
    'gss' => 'application/x-gss',
    'gzip' => 'multipart/x-gzip',
    'help' => 'application/x-helpfile',
    'hgl' => 'application/vnd.hp-hpgl',
    'hlb' => 'text/x-script',
    'hlp' => 'application/x-winhelp',
    'hpg' => 'application/vnd.hp-hpgl',
    'hpgl' => 'application/vnd.hp-hpgl',
    'hta' => 'application/hta',
    'htc' => 'text/x-component',
    'htmls' => 'text/html',
    'htt' => 'text/webviewhtml',
    'htx' => 'text/html',
    'ico' => 'image/x-icon',
    'idc' => 'text/plain',
    'iefs' => 'image/ief',
    'ima' => 'application/x-ima',
    'imap' => 'application/x-httpd-imap',
    'inf' => 'application/inf',
    'ins' => 'application/x-internett-signup',
    'ip' => 'application/x-ip2',
    'isu' => 'video/x-isvideo',
    'it' => 'audio/it',
    'iv' => 'application/x-inventor',
    'ivr' => 'i-world/i-vrml',
    'ivy' => 'application/x-livescreen',
    'jam' => 'audio/x-jam',
    'jav' => 'text/x-java-source',
    'java' => 'text/x-java-source',
    'jcm' => 'application/x-java-commerce',
    'jfif' => 'image/pjpeg',
    'jfif-tbnl' => 'image/jpeg',
    'jps' => 'image/x-jps',
    'jut' => 'image/jutvision',
    'ksh' => 'text/x-script.ksh',
    'la' => 'audio/x-nspaudio',
    'lam' => 'audio/x-liveaudio',
    'lhx' => 'application/octet-stream',
    'list' => 'text/plain',
    'lma' => 'audio/x-nspaudio',
    'log' => 'text/plain',
    'lst' => 'text/plain',
    'lsx' => 'text/x-la-asf',
    'ltx' => 'application/x-latex',
    'lzx' => 'application/x-lzx',
    'm1v' => 'video/mpeg',
    'm2a' => 'audio/mpeg',
    'm2v' => 'video/mpeg',
    'map' => 'application/x-navimap',
    'mar' => 'text/plain',
    'mbd' => 'application/mbedlet',
    'mc$' => 'application/x-magic-cap-package-1.0',
    'mcd' => 'application/x-mathcad',
    'mcf' => 'text/mcf',
    'mcp' => 'application/netmc',
    'mht' => 'message/rfc822',
    'mhtml' => 'message/rfc822',
    'mjf' => 'audio/x-vnd.audioexplosion.mjuicemediafile',
    'mjpg' => 'video/x-motion-jpeg',
    'mm' => 'application/x-meme',
    'mme' => 'application/base64',
    'mod' => 'audio/x-mod',
    'moov' => 'video/quicktime',
    'mpa' => 'video/mpeg',
    'mpc' => 'application/x-project',
    'mpp' => 'application/vnd.ms-project',
    'mpt' => 'application/x-project',
    'mpv' => 'application/x-project',
    'mpx' => 'application/x-project',
    'mrc' => 'application/marc',
    'mv' => 'video/x-sgi-movie',
    'my' => 'audio/make',
    'mzz' => 'application/x-vnd.audioexplosion.mzz',
    'nap' => 'image/naplps',
    'naplps' => 'image/naplps',
    'ncm' => 'application/vnd.nokia.configuration-message',
    'nif' => 'image/x-niff',
    'niff' => 'image/x-niff',
    'nix' => 'application/x-mix-transfer',
    'nsc' => 'application/x-conference',
    'nvd' => 'application/x-navidoc',
    'o' => 'application/octet-stream',
    'omc' => 'application/x-omc',
    'omcd' => 'application/x-omcdatamaker',
    'omcr' => 'application/x-omcregerator',
    'p' => 'text/x-pascal',
    'p10' => 'application/x-pkcs10',
    'p12' => 'application/x-pkcs12',
    'p7a' => 'application/x-pkcs7-signature',
    'p7c' => 'application/x-pkcs7-mime',
    'p7m' => 'application/x-pkcs7-mime',
    'p7r' => 'application/x-pkcs7-certreqresp',
    'p7s' => 'application/pkcs7-signature',
    'part' => 'application/pro_eng',
    'pas' => 'text/pascal',
    'pcl' => 'application/x-pcl',
    'pct' => 'image/x-pict',
    'pcx' => 'image/x-pcx',
    'pfunk' => 'audio/make.my.funk',
    'pic' => 'image/pict',
    'pict' => 'image/pict',
    'pkg' => 'application/x-newton-compatible-pkg',
    'pko' => 'application/vnd.ms-pki.pko',
    'plx' => 'application/x-pixclscript',
    'pm4' => 'application/x-pagemaker',
    'pm5' => 'application/x-pagemaker',
    'pov' => 'model/x-pov',
    'ppa' => 'application/vnd.ms-powerpoint',
    'psd' => 'application/octet-stream',
    'pvu' => 'paleovu/x-pv',
    'pwz' => 'application/vnd.ms-powerpoint',
    'py' => 'text/x-script.phyton',
    'pyc' => 'applicaiton/x-bytecode.python',
    'qcp' => 'audio/vnd.qcelp',
    'qd3' => 'x-world/x-3dmf',
    'qd3d' => 'x-world/x-3dmf',
    'qif' => 'image/x-quicktime',
    'qtc' => 'video/x-qtc',
    'qti' => 'image/x-quicktime',
    'qtif' => 'image/x-quicktime',
    'rast' => 'image/cmu-raster',
    'rexx' => 'text/x-script.rexx',
    'rf' => 'image/vnd.rn-realflash',
    'rmi' => 'audio/mid',
    'rmm' => 'audio/x-pn-realaudio',
    'rmp' => 'audio/x-pn-realaudio-plugin',
    'rng' => 'application/vnd.nokia.ringing-tone',
    'rnx' => 'application/vnd.rn-realplayer',
    'rp' => 'image/vnd.rn-realpix',
    'rt' => 'text/vnd.rn-realtext',
    'rv' => 'video/vnd.rn-realvideo',
    's' => 'text/x-asm',
    's3m' => 'audio/s3m',
    'saveme' => 'application/octet-stream',
    'sbk' => 'application/x-tbook',
    'sdml' => 'text/plain',
    'sdp' => 'application/x-sdp',
    'sdr' => 'application/sounder',
    'sea' => 'application/x-sea',
    'shtml' => 'text/x-server-parsed-html',
    'sid' => 'audio/x-psid',
    'sl' => 'application/x-seelogo',
    'spc' => 'text/x-speech',
    'spr' => 'application/x-sprite',
    'sprite' => 'application/x-sprite',
    'ssi' => 'text/x-server-parsed-html',
    'ssm' => 'application/streamingmedia',
    'sst' => 'application/vnd.ms-pki.certstore',
    'svf' => 'image/x-dwg',
    'svr' => 'x-world/x-svr',
    'talk' => 'text/x-speech',
    'tbk' => 'application/x-tbook',
    'tcsh' => 'text/x-script.tcsh',
    'text' => 'text/plain',
    'turbot' => 'image/florian',
    'uil' => 'text/x-uil',
    'uni' => 'text/uri-list',
    'unis' => 'text/uri-list',
    'uri' => 'text/uri-list',
    'uris' => 'text/uri-list',
    'uu' => 'text/x-uuencode',
    'uue' => 'text/x-uuencode',
    'vcs' => 'text/x-vcalendar',
    'vdo' => 'video/vdo',
    'vew' => 'application/groupwise',
    'vmd' => 'application/vocaltec-media-desc',
    'vmf' => 'application/vocaltec-media-file',
    'voc' => 'audio/x-voc',
    'vos' => 'video/vosaic',
    'vox' => 'audio/voxware',
    'vqe' => 'audio/x-twinvq-plugin',
    'vqf' => 'audio/x-twinvq',
    'vql' => 'audio/x-twinvq-plugin',
    'vrt' => 'x-world/x-vrt',
    'vsd' => 'application/x-visio',
    'vst' => 'application/x-visio',
    'vsw' => 'application/x-visio',
    'w60' => 'application/wordperfect6.0',
    'w61' => 'application/wordperfect6.1',
    'w6w' => 'application/msword',
    'wb1' => 'application/x-qpro',
    'wbmp' => 'image/vnd.wap.wbmp',
    'web' => 'application/vnd.xara',
    'wiz' => 'application/msword',
    'wk1' => 'application/x-123',
    'wmf' => 'windows/metafile',
    'wml' => 'text/vnd.wap.wml',
    'wmlc' => 'application/vnd.wap.wmlc',
    'wmls' => 'text/vnd.wap.wmlscript',
    'wmlsc' => 'application/vnd.wap.wmlscriptc',
    'word' => 'application/msword',
    'wp' => 'application/wordperfect',
    'wp5' => 'application/wordperfect6.0',
    'wp6' => 'application/wordperfect',
    'wpd' => 'application/x-wpwin',
    'wq1' => 'application/x-lotus',
    'wri' => 'application/x-wri',
    'wrz' => 'x-world/x-vrml',
    'wsc' => 'text/scriplet',
    'wsrc' => 'application/x-wais-source',
    'wtk' => 'application/x-wintalk',
    'xdr' => 'video/x-amt-demorun',
    'xgz' => 'xgl/drawing',
    'xif' => 'image/vnd.xiff',
    'xl' => 'application/excel',
    'xla' => 'application/x-msexcel',
    'xlb' => 'application/x-excel',
    'xld' => 'application/x-excel',
    'xlk' => 'application/x-excel',
    'xlt' => 'application/x-excel',
    'xlv' => 'application/x-excel',
    'xm' => 'audio/xm',
    'xmz' => 'xgl/movie',
    'xpix' => 'application/x-vnd.ls-xpix',
    'x-png' => 'image/png',
    'xsr' => 'video/x-amt-showrun',
    'z' => 'application/x-compressed',
    'zoo' => 'application/octet-stream',
    'zsh' => 'text/x-script.zsh',
    );
  • Frozzeg

    Сообщения: 5641 Репутация: N Группа: Джедаи

    Spritz 26 августа 2011 г. 19:26, спустя 18 минут 48 секунд

    классно, внатуре классно!
    You can be anything you want to be. Just turn yourself into anything you think that you could ever be.
  • AlexanderC

    Сообщения: 270 Репутация: N Группа: Кто попало

    Spritz 26 августа 2011 г. 19:29, спустя 3 минуты 19 секунд

    я не жадный… )
  • Абырвалг

    Сообщения: 6480 Репутация: N Группа: Джедаи
  • AlexanderC

    Сообщения: 270 Репутация: N Группа: Кто попало

    Spritz 26 августа 2011 г. 19:40, спустя 8 минут 40 секунд

    у меня их больше ))
  • AlexanderC

    Сообщения: 270 Репутация: N Группа: Кто попало

    Spritz 26 августа 2011 г. 19:52, спустя 12 минут 24 секунды

    спс за ссылочку кстати, забыл в симфе посмотреть… так что обновлённый список:

    array (
     'stl' => 'application/SLA',
     'step' => 'application/STEP',
     'stp' => 'application/STEP',
     'dwg' => 'application/acad',
     'ez' => 'application/andrew-inset',
     'ccad' => 'application/clariscad',
     'drw' => 'application/drafting',
     'tsp' => 'application/dsptype',
     'dxf' => 'application/dxf',
     'xls' => 'application/vnd.ms-excel',
     'unv' => 'application/i-deas',
     'jar' => 'application/java-archive',
     'hqx' => 'application/mac-binhex40',
     'cpt' => 'application/mac-compactpro',
     'pot' => 'application/vnd.ms-powerpoint',
     'pps' => 'application/vnd.ms-powerpoint',
     'ppt' => 'application/vnd.ms-powerpoint',
     'ppz' => 'application/vnd.ms-powerpoint',
     'doc' => 'application/msword',
     'bin' => 'application/octet-stream',
     'class' => 'application/octet-stream',
     'dms' => 'application/octet-stream',
     'exe' => 'application/x-msdos-program',
     'lha' => 'application/octet-stream',
     'lzh' => 'application/octet-stream',
     'oda' => 'application/oda',
     'ogg' => 'application/ogg',
     'ogm' => 'application/ogg',
     'pdf' => 'application/pdf',
     'pgp' => 'application/pgp',
     'ai' => 'application/postscript',
     'eps' => 'application/postscript',
     'ps' => 'application/postscript',
     'prt' => 'application/pro_eng',
     'rtf' => 'text/rtf',
     'set' => 'application/set',
     'smi' => 'application/smil',
     'smil' => 'application/smil',
     'sol' => 'application/solids',
     'vda' => 'application/vda',
     'mif' => 'application/x-mif',
     'xlc' => 'application/vnd.ms-excel',
     'xll' => 'application/vnd.ms-excel',
     'xlm' => 'application/vnd.ms-excel',
     'xlw' => 'application/vnd.ms-excel',
     'cod' => 'application/vnd.rim.cod',
     'arj' => 'application/x-arj-compressed',
     'bcpio' => 'application/x-bcpio',
     'vcd' => 'application/x-cdlink',
     'pgn' => 'application/x-chess-pgn',
     'cpio' => 'application/x-cpio',
     'csh' => 'application/x-csh',
     'deb' => 'application/x-debian-package',
     'dcr' => 'application/x-director',
     'dir' => 'application/x-director',
     'dxr' => 'application/x-director',
     'dvi' => 'application/x-dvi',
     'pre' => 'application/x-freelance',
     'spl' => 'application/x-futuresplash',
     'gtar' => 'application/x-gtar',
     'gz' => 'application/x-gzip',
     'hdf' => 'application/x-hdf',
     'ipx' => 'application/x-ipix',
     'ips' => 'application/x-ipscript',
     'js' => 'application/x-javascript',
     'skd' => 'application/x-koan',
     'skm' => 'application/x-koan',
     'skp' => 'application/x-koan',
     'skt' => 'application/x-koan',
     'latex' => 'application/x-latex',
     'lsp' => 'application/x-lisp',
     'scm' => 'application/x-lotusscreencam',
     'bat' => 'application/x-msdos-program',
     'com' => 'application/x-msdos-program',
     'cdf' => 'application/x-netcdf',
     'nc' => 'application/x-netcdf',
     'pl' => 'application/x-perl',
     'pm' => 'application/x-perl',
     'php' => 'application/x-php',
     'inc' => 'application/x-php',
     'phps' => 'application/x-httpd-php-source',
     'phar' => 'application/x-php-archive',
     'rar' => 'application/x-rar-compressed',
     'sh' => 'application/x-sh',
     'shar' => 'application/x-shar',
     'swf' => 'application/x-shockwave-flash',
     'sit' => 'application/x-stuffit',
     'sv4cpio' => 'application/x-sv4cpio',
     'sv4crc' => 'application/x-sv4crc',
     'tar.gz' => 'application/x-tar-gz',
     'tgz' => 'application/x-tar-gz',
     'tar' => 'application/x-tar',
     'tcl' => 'application/x-tcl',
     'tex' => 'application/x-tex',
     'texi' => 'application/x-texinfo',
     'texinfo' => 'application/x-texinfo',
     'man' => 'application/x-troff-man',
     'me' => 'application/x-troff-me',
     'ms' => 'application/x-troff-ms',
     'roff' => 'application/x-troff',
     't' => 'application/x-troff',
     'tr' => 'application/x-troff',
     'ustar' => 'application/x-ustar',
     'src' => 'application/x-wais-source',
     'zip' => 'application/zip',
     'tsi' => 'audio/TSP-audio',
     'au' => 'audio/ulaw',
     'snd' => 'audio/basic',
     'kar' => 'audio/midi',
     'mid' => 'audio/midi',
     'midi' => 'audio/midi',
     'mp2' => 'video/mpeg',
     'mp3' => 'audio/mpeg',
     'mpga' => 'audio/mpeg',
     'aif' => 'audio/x-aiff',
     'aifc' => 'audio/x-aiff',
     'aiff' => 'audio/x-aiff',
     'm3u' => 'audio/x-mpegurl',
     'wax' => 'audio/x-ms-wax',
     'wma' => 'audio/x-ms-wma',
     'rpm' => 'audio/x-pn-realaudio-plugin',
     'ram' => 'audio/x-pn-realaudio',
     'rm' => 'audio/x-pn-realaudio',
     'ra' => 'audio/x-realaudio',
     'wav' => 'audio/x-wav',
     'pdb' => 'chemical/x-pdb',
     'xyz' => 'chemical/x-pdb',
     'ras' => 'image/x-cmu-raster',
     'gif' => 'image/gif',
     'ief' => 'image/ief',
     'jpe' => 'image/jpeg',
     'jpeg' => 'image/jpeg',
     'jpg' => 'image/jpeg',
     'png' => 'image/png',
     'tif' => 'image/tiff',
     'tiff' => 'image/tiff',
     'pnm' => 'image/x-portable-anymap',
     'pbm' => 'image/x-portable-bitmap',
     'pgm' => 'image/x-portable-graymap',
     'ppm' => 'image/x-portable-pixmap',
     'rgb' => 'image/x-rgb',
     'xbm' => 'image/x-xbitmap',
     'xpm' => 'image/x-xpixmap',
     'xwd' => 'image/x-xwindowdump',
     'iges' => 'model/iges',
     'igs' => 'model/iges',
     'mesh' => 'model/mesh',
     'msh' => 'model/mesh',
     'silo' => 'model/mesh',
     'vrml' => 'x-world/x-vrml',
     'wrl' => 'model/vrml',
     'css' => 'text/css',
     'htm' => 'text/html',
     'html' => 'text/html',
     'asc' => 'text/plain',
     'txt' => 'text/plain',
     'c' => 'text/plain',
     'cc' => 'text/plain',
     'f90' => 'text/plain',
     'f' => 'text/plain',
     'h' => 'text/plain',
     'hh' => 'text/plain',
     'm' => 'text/plain',
     'rtx' => 'text/richtext',
     'sgm' => 'text/sgml',
     'sgml' => 'text/sgml',
     'tsv' => 'text/tab-separated-values',
     'jad' => 'text/vnd.sun.j2me.app-descriptor',
     'etx' => 'text/x-setext',
     'xml' => 'text/xml',
     'dl' => 'video/dl',
     'fli' => 'video/x-fli',
     'flv' => 'video/flv',
     'gl' => 'video/gl',
     'mpe' => 'video/mpeg',
     'mpeg' => 'video/mpeg',
     'mpg' => 'video/mpeg',
     'mov' => 'video/quicktime',
     'qt' => 'video/quicktime',
     'viv' => 'video/vnd.vivo',
     'vivo' => 'video/vnd.vivo',
     'asf' => 'video/x-ms-asf',
     'asx' => 'video/x-ms-asx',
     'wmv' => 'video/x-ms-wmv',
     'wmx' => 'video/x-ms-wmx',
     'wvx' => 'video/x-ms-wvx',
     'avi' => 'video/x-msvideo',
     'movie' => 'video/x-sgi-movie',
     'mime' => 'www/mime',
     'ice' => 'x-conference/x-cooltalk',
     'vrm' => 'x-world/x-vrml',
     '3dm' => 'x-world/x-3dmf',
     '3dmf' => 'x-world/x-3dmf',
     'a' => 'application/octet-stream',
     'aab' => 'application/x-authorware-bin',
     'aam' => 'application/x-authorware-map',
     'aas' => 'application/x-authorware-seg',
     'abc' => 'text/vnd.abc',
     'acgi' => 'text/html',
     'afl' => 'video/animaflex',
     'aim' => 'application/x-aim',
     'aip' => 'text/x-audiosoft-intra',
     'ani' => 'application/x-navi-animation',
     'aos' => 'application/x-nokia-9000-communicator-add-on-software',
     'aps' => 'application/mime',
     'arc' => 'application/octet-stream',
     'art' => 'image/x-jg',
     'asm' => 'text/x-asm',
     'asp' => 'text/asp',
     'avs' => 'video/avs-video',
     'bm' => 'image/bmp',
     'bmp' => 'image/x-windows-bmp',
     'boo' => 'application/book',
     'book' => 'application/book',
     'boz' => 'application/x-bzip2',
     'bsh' => 'application/x-bsh',
     'bz' => 'application/x-bzip',
     'bz2' => 'application/x-bzip2',
     'c++' => 'text/plain',
     'cat' => 'application/vnd.ms-pki.seccat',
     'cco' => 'application/x-cocoa',
     'cer' => 'application/x-x509-ca-cert',
     'cha' => 'application/x-chat',
     'chat' => 'application/x-chat',
     'conf' => 'text/plain',
     'cpp' => 'text/x-c',
     'crl' => 'application/pkix-crl',
     'crt' => 'application/x-x509-user-cert',
     'cxx' => 'text/plain',
     'deepv' => 'application/x-deepv',
     'def' => 'text/plain',
     'der' => 'application/x-x509-ca-cert',
     'dif' => 'video/x-dv',
     'dot' => 'application/msword',
     'dp' => 'application/commonground',
     'dump' => 'application/octet-stream',
     'dv' => 'video/x-dv',
     'dwf' => 'model/vnd.dwf',
     'el' => 'text/x-script.elisp',
     'elc' => 'application/x-elc',
     'env' => 'application/x-envoy',
     'es' => 'application/x-esrehber',
     'evy' => 'application/x-envoy',
     'f77' => 'text/x-fortran',
     'fdf' => 'application/vnd.fdf',
     'fif' => 'image/fif',
     'flo' => 'image/florian',
     'flx' => 'text/vnd.fmi.flexstor',
     'fmf' => 'video/x-atomic3d-feature',
     'for' => 'text/x-fortran',
     'fpx' => 'image/vnd.net-fpx',
     'frl' => 'application/freeloader',
     'funk' => 'audio/make',
     'g' => 'text/plain',
     'g3' => 'image/g3fax',
     'gsd' => 'audio/x-gsm',
     'gsm' => 'audio/x-gsm',
     'gsp' => 'application/x-gsp',
     'gss' => 'application/x-gss',
     'gzip' => 'multipart/x-gzip',
     'help' => 'application/x-helpfile',
     'hgl' => 'application/vnd.hp-hpgl',
     'hlb' => 'text/x-script',
     'hlp' => 'application/x-winhelp',
     'hpg' => 'application/vnd.hp-hpgl',
     'hpgl' => 'application/vnd.hp-hpgl',
     'hta' => 'application/hta',
     'htc' => 'text/x-component',
     'htmls' => 'text/html',
     'htt' => 'text/webviewhtml',
     'htx' => 'text/html',
     'ico' => 'image/x-icon',
     'idc' => 'text/plain',
     'iefs' => 'image/ief',
     'ima' => 'application/x-ima',
     'imap' => 'application/x-httpd-imap',
     'inf' => 'application/inf',
     'ins' => 'application/x-internett-signup',
     'ip' => 'application/x-ip2',
     'isu' => 'video/x-isvideo',
     'it' => 'audio/it',
     'iv' => 'application/x-inventor',
     'ivr' => 'i-world/i-vrml',
     'ivy' => 'application/x-livescreen',
     'jam' => 'audio/x-jam',
     'jav' => 'text/x-java-source',
     'java' => 'text/x-java-source',
     'jcm' => 'application/x-java-commerce',
     'jfif' => 'image/pjpeg',
     'jfif-tbnl' => 'image/jpeg',
     'jps' => 'image/x-jps',
     'jut' => 'image/jutvision',
     'ksh' => 'text/x-script.ksh',
     'la' => 'audio/x-nspaudio',
     'lam' => 'audio/x-liveaudio',
     'lhx' => 'application/octet-stream',
     'list' => 'text/plain',
     'lma' => 'audio/x-nspaudio',
     'log' => 'text/plain',
     'lst' => 'text/plain',
     'lsx' => 'text/x-la-asf',
     'ltx' => 'application/x-latex',
     'lzx' => 'application/x-lzx',
     'm1v' => 'video/mpeg',
     'm2a' => 'audio/mpeg',
     'm2v' => 'video/mpeg',
     'map' => 'application/x-navimap',
     'mar' => 'text/plain',
     'mbd' => 'application/mbedlet',
     'mc$' => 'application/x-magic-cap-package-1.0',
     'mcd' => 'application/x-mathcad',
     'mcf' => 'text/mcf',
     'mcp' => 'application/netmc',
     'mht' => 'message/rfc822',
     'mhtml' => 'message/rfc822',
     'mjf' => 'audio/x-vnd.audioexplosion.mjuicemediafile',
     'mjpg' => 'video/x-motion-jpeg',
     'mm' => 'application/x-meme',
     'mme' => 'application/base64',
     'mod' => 'audio/x-mod',
     'moov' => 'video/quicktime',
     'mpa' => 'video/mpeg',
     'mpc' => 'application/x-project',
     'mpp' => 'application/vnd.ms-project',
     'mpt' => 'application/x-project',
     'mpv' => 'application/x-project',
     'mpx' => 'application/x-project',
     'mrc' => 'application/marc',
     'mv' => 'video/x-sgi-movie',
     'my' => 'audio/make',
     'mzz' => 'application/x-vnd.audioexplosion.mzz',
     'nap' => 'image/naplps',
     'naplps' => 'image/naplps',
     'ncm' => 'application/vnd.nokia.configuration-message',
     'nif' => 'image/x-niff',
     'niff' => 'image/x-niff',
     'nix' => 'application/x-mix-transfer',
     'nsc' => 'application/x-conference',
     'nvd' => 'application/x-navidoc',
     'o' => 'application/octet-stream',
     'omc' => 'application/x-omc',
     'omcd' => 'application/x-omcdatamaker',
     'omcr' => 'application/x-omcregerator',
     'p' => 'text/x-pascal',
     'p10' => 'application/x-pkcs10',
     'p12' => 'application/x-pkcs12',
     'p7a' => 'application/x-pkcs7-signature',
     'p7c' => 'application/x-pkcs7-mime',
     'p7m' => 'application/x-pkcs7-mime',
     'p7r' => 'application/x-pkcs7-certreqresp',
     'p7s' => 'application/pkcs7-signature',
     'part' => 'application/pro_eng',
     'pas' => 'text/pascal',
     'pcl' => 'application/x-pcl',
     'pct' => 'image/x-pict',
     'pcx' => 'image/x-pcx',
     'pfunk' => 'audio/make.my.funk',
     'pic' => 'image/pict',
     'pict' => 'image/pict',
     'pkg' => 'application/x-newton-compatible-pkg',
     'pko' => 'application/vnd.ms-pki.pko',
     'plx' => 'application/x-pixclscript',
     'pm4' => 'application/x-pagemaker',
     'pm5' => 'application/x-pagemaker',
     'pov' => 'model/x-pov',
     'ppa' => 'application/vnd.ms-powerpoint',
     'psd' => 'application/octet-stream',
     'pvu' => 'paleovu/x-pv',
     'pwz' => 'application/vnd.ms-powerpoint',
     'py' => 'text/x-script.phyton',
     'pyc' => 'applicaiton/x-bytecode.python',
     'qcp' => 'audio/vnd.qcelp',
     'qd3' => 'x-world/x-3dmf',
     'qd3d' => 'x-world/x-3dmf',
     'qif' => 'image/x-quicktime',
     'qtc' => 'video/x-qtc',
     'qti' => 'image/x-quicktime',
     'qtif' => 'image/x-quicktime',
     'rast' => 'image/cmu-raster',
     'rexx' => 'text/x-script.rexx',
     'rf' => 'image/vnd.rn-realflash',
     'rmi' => 'audio/mid',
     'rmm' => 'audio/x-pn-realaudio',
     'rmp' => 'audio/x-pn-realaudio-plugin',
     'rng' => 'application/vnd.nokia.ringing-tone',
     'rnx' => 'application/vnd.rn-realplayer',
     'rp' => 'image/vnd.rn-realpix',
     'rt' => 'text/vnd.rn-realtext',
     'rv' => 'video/vnd.rn-realvideo',
     's' => 'text/x-asm',
     's3m' => 'audio/s3m',
     'saveme' => 'application/octet-stream',
     'sbk' => 'application/x-tbook',
     'sdml' => 'text/plain',
     'sdp' => 'application/x-sdp',
     'sdr' => 'application/sounder',
     'sea' => 'application/x-sea',
     'shtml' => 'text/x-server-parsed-html',
     'sid' => 'audio/x-psid',
     'sl' => 'application/x-seelogo',
     'spc' => 'text/x-speech',
     'spr' => 'application/x-sprite',
     'sprite' => 'application/x-sprite',
     'ssi' => 'text/x-server-parsed-html',
     'ssm' => 'application/streamingmedia',
     'sst' => 'application/vnd.ms-pki.certstore',
     'svf' => 'image/x-dwg',
     'svr' => 'x-world/x-svr',
     'talk' => 'text/x-speech',
     'tbk' => 'application/x-tbook',
     'tcsh' => 'text/x-script.tcsh',
     'text' => 'text/plain',
     'turbot' => 'image/florian',
     'uil' => 'text/x-uil',
     'uni' => 'text/uri-list',
     'unis' => 'text/uri-list',
     'uri' => 'text/uri-list',
     'uris' => 'text/uri-list',
     'uu' => 'text/x-uuencode',
     'uue' => 'text/x-uuencode',
     'vcs' => 'text/x-vcalendar',
     'vdo' => 'video/vdo',
     'vew' => 'application/groupwise',
     'vmd' => 'application/vocaltec-media-desc',
     'vmf' => 'application/vocaltec-media-file',
     'voc' => 'audio/x-voc',
     'vos' => 'video/vosaic',
     'vox' => 'audio/voxware',
     'vqe' => 'audio/x-twinvq-plugin',
     'vqf' => 'audio/x-twinvq',
     'vql' => 'audio/x-twinvq-plugin',
     'vrt' => 'x-world/x-vrt',
     'vsd' => 'application/x-visio',
     'vst' => 'application/x-visio',
     'vsw' => 'application/x-visio',
     'w60' => 'application/wordperfect6.0',
     'w61' => 'application/wordperfect6.1',
     'w6w' => 'application/msword',
     'wb1' => 'application/x-qpro',
     'wbmp' => 'image/vnd.wap.wbmp',
     'web' => 'application/vnd.xara',
     'wiz' => 'application/msword',
     'wk1' => 'application/x-123',
     'wmf' => 'windows/metafile',
     'wml' => 'text/vnd.wap.wml',
     'wmlc' => 'application/vnd.wap.wmlc',
     'wmls' => 'text/vnd.wap.wmlscript',
     'wmlsc' => 'application/vnd.wap.wmlscriptc',
     'word' => 'application/msword',
     'wp' => 'application/wordperfect',
     'wp5' => 'application/wordperfect6.0',
     'wp6' => 'application/wordperfect',
     'wpd' => 'application/x-wpwin',
     'wq1' => 'application/x-lotus',
     'wri' => 'application/x-wri',
     'wrz' => 'x-world/x-vrml',
     'wsc' => 'text/scriplet',
     'wsrc' => 'application/x-wais-source',
     'wtk' => 'application/x-wintalk',
     'xdr' => 'video/x-amt-demorun',
     'xgz' => 'xgl/drawing',
     'xif' => 'image/vnd.xiff',
     'xl' => 'application/excel',
     'xla' => 'application/x-msexcel',
     'xlb' => 'application/x-excel',
     'xld' => 'application/x-excel',
     'xlk' => 'application/x-excel',
     'xlt' => 'application/x-excel',
     'xlv' => 'application/x-excel',
     'xm' => 'audio/xm',
     'xmz' => 'xgl/movie',
     'xpix' => 'application/x-vnd.ls-xpix',
     'x-png' => 'image/png',
     'xsr' => 'video/x-amt-showrun',
     'z' => 'application/x-compressed',
     'zoo' => 'application/octet-stream',
     'zsh' => 'text/x-script.zsh',
     'base64' => 'application/appledouble',
     'pqi' => 'application/cprplayer',
     'pfr' => 'application/font-tdpfr',
     'stk' => 'application/hstu',
     'mfp' => 'application/mirage',
     'orq' => 'application/ocsp-request',
     'ors' => 'application/ocsp-response',
     '7bit' => 'application/pgp-encrypted',
     'sig' => 'application/pgp-signature',
     'pkipath' => 'application/pkix-pkipath',
     'pki' => 'application/pkixcmp',
     'shw' => 'application/presentations',
     'cw' => 'application/prs.cww',
     'rnd' => 'application/prs.nprend',
     'qrt' => 'application/quest',
     'soc' => 'application/sgml-open-catalog',
     'siv' => 'application/sieve',
     'plb' => 'application/vnd.3gpp.pic-bw-large',
     'psb' => 'application/vnd.3gpp.pic-bw-small',
     'pvb' => 'application/vnd.3gpp.pic-bw-var',
     'sms' => 'application/vnd.3gpp.sms',
     'atc' => 'application/vnd.acucorp',
     'xfdf' => 'application/vnd.adobe.xfdf',
     'ami' => 'application/vnd.amiga.amu',
     'mpm' => 'application/vnd.blueice.multipass',
    Спустя 237 сек.
    блин, не поместился… засру я всю тему короче…((
    1. mime.txt (59)
  • Sinkler

    Сообщения: 7958 Репутация: N Группа: в ухо

    Spritz 26 августа 2011 г. 21:10, спустя 1 час 18 минут 26 секунд

    прикольно, сохранил на всякий
  • Ivan

    Сообщения: 1316 Репутация: N Группа: Адекваты

    Spritz 26 августа 2011 г. 21:51, спустя 40 минут 59 секунд

    У меня их больше =)

    #! /usr/bin/perl
    # запилите подсветку для perl =)
    use strict;
    my (%types, $type, @ext, $key, $value, @k, $p, $lkey, $lvalue, $x);

    # парсим mime.types апача
    open MIMETYPES, 'mime.types';
    while (<MIMETYPES>) {do {($type, @ext) = split ' '; $types{$_} = $type for @ext} unless (/^#/)}
    close MIMETYPES;

    # преобразуем hash в php serialized-array и пишем в файл
    @k = keys %types; $x = $#k+1;
    while(($key, $value) = each %types) {
    ($lkey, $lvalue) = (length($key), length($value));
    $p .= qq/s:$lkey:"$key";s:$lvalue:"$value";/;
    }
    open RESULT, '>mime.phps';
    print RESULT "a:$x:{$p}";
    close RESULT;


    <?php
    $types = unserialize(file_get_contents('mime.phps'));
    var_dump($types);

    1. mime.zip (18)
  • phpdude

    Сообщения: 26646 Репутация: N Группа: в ухо

    Spritz 26 августа 2011 г. 21:56, спустя 4 минуты 22 секунды

    все таки перл - ужасный язык имхо
    Сапожник без сапог
  • Ivan

    Сообщения: 1316 Репутация: N Группа: Адекваты

    Spritz 26 августа 2011 г. 22:02, спустя 6 минут 12 секунд


    все таки перл - ужасный язык имхо


    Это просто я не расписывал ничего, ты не видел как пишут гуру наверное, у них код совсем не понятен, или рисуется в виде верблюда табами. Можно и похапе-стайл нарисовать, всё прокомментировать, не использовать magic scalars и тд. Никто не запрещает тебе писать так как ты хочешь =)
  • phpdude

    Сообщения: 26646 Репутация: N Группа: в ухо

    Spritz 26 августа 2011 г. 22:09, спустя 6 минут 49 секунд

    Ivan,
    Никто не запрещает тебе писать так как ты хочешь =)

    вот в этом то и проблема языка я считаю :)
    Сапожник без сапог
  • Ivan

    Сообщения: 1316 Репутация: N Группа: Адекваты

    Spritz 26 августа 2011 г. 22:24, спустя 14 минут 55 секунд

    use strict;

    Эта строка сигнализирует что код можно прочитать, она делает строгие рамки для кода (все переменные должны быть инициализированы, приватные/публичные, все скобочки должны быть на месте и тд). Если писать без строгих рамок, то можно даже самому в своём собственном коде запутаться, и это очень даже легко если надрочился на магические переменные перла ($_, @_, $\. $# и тому подобные). Самую большую опасность таит $_ - это скаляр по кличке "ниндзя". Его можно не указывать он сам найдет себе место.

    Например:
    ($type, @ext) = split ' ';


    Расшифровывается:
    ($type, @ext) = split ' ', $_;


    Или:
    unless (/^#/)


    Расшифровывается:
    unless ($_=~/^#/)


    Уроки perl на пiха.ру
  • Sinkler

    Сообщения: 7958 Репутация: N Группа: в ухо

    Spritz 26 августа 2011 г. 22:51, спустя 27 минут 22 секунды

    а я еще как-то умудрился на перле курсач написать)))
  • technobulka

    Сообщения: 4540 Репутация: N Группа: Джедаи

    Spritz 27 августа 2011 г. 1:13, спустя 2 часа 21 минуту 33 секунды

    эт вы типа так письками меряетесь?)
    Высокоуровневое абстрактное говно

Пожалуйста, авторизуйтесь, чтобы написать комментарий!