MIME Type Reporter
Generally, when a browser requests a file, the server tells the browser the type of content to expect immediately before it sends the content. The type of content is called the MIME type, a label used to identify a type of data.
Here are a few MIME type examples:
text/html text/plain image/png text/javascript application/pdf
When a PHP script sends the content of a file to the browser, it is assumed to be MIME type text/html. Therefore, if your file is of a different type, you will need to specify the MIME type.
To specify the MIME type, you will need to know what the MIME type is. This article includes a PHP script to help determine the MIME type. The script will be addressed in a moment.
Here is example PHP code to specify MIME type
header('Content-Type: text/javascript');
Following the above header()
statement, the PHP script can send JavaScript code to the browser.
A content type can be associated with a file name extension. The content type associated with a file named picture.png
would be image/png
, for example.
Not every file name extension has a corresponding MIME type.
If the content type is text then the text/plain
MIME type might be appropriate, or text/html
if it is meant to be displayed on a web page. For others that don't have a corresponding MIME type, an equivalent MIME type may need to be selected, one that tells the browser the type of content the file contains.
The File Extension MIME Lookup PHP script (source code included with this article) does a lookup and reports the MIME type of the file name extension you specify. If no MIME type is found for your requested extension, you will be informed that none is available.
Here is a live implementation. It is interfaced with Ajax so it can be used in this article.
You may bookmark and continue to use the live implementation, if you wish, in lieu of installing the PHP script on your server.
If you do wish to install the File Extension MIME Lookup PHP script on your server, here is the source code.
<?php /* File Extension MIME Lookup Version 1.0 Tue, 12 Sep 2023 Will Bontrager Software LLC https://www.willmaster.com/ */ $Arr=array(); $Arr['123']=array('application/vnd.lotus-1-2-3'); $Arr['3dml']=array('text/vnd.in3d.3dml'); $Arr['3ds']=array('image/x-3ds'); $Arr['3g2']=array('video/3gpp2'); $Arr['3gp']=array('video/3gpp'); $Arr['7z']=array('application/x-7z-compressed'); $Arr['aab']=array('application/x-authorware-bin'); $Arr['aac']=array('audio/x-aac'); $Arr['aam']=array('application/x-authorware-map'); $Arr['aas']=array('application/x-authorware-seg'); $Arr['abw']=array('application/x-abiword'); $Arr['ac']=array('application/pkix-attr-cert'); $Arr['acc']=array('application/vnd.americandynamics.acc'); $Arr['ace']=array('application/x-ace-compressed'); $Arr['acu']=array('application/vnd.acucobol'); $Arr['acutc']=array('application/vnd.acucorp'); $Arr['adp']=array('audio/adpcm'); $Arr['aep']=array('application/vnd.audiograph'); $Arr['afm']=array('application/x-font-type1'); $Arr['afp']=array('application/vnd.ibm.modcap'); $Arr['ahead']=array('application/vnd.ahead.space'); $Arr['ai']=array('application/postscript'); $Arr['aif']=array('audio/x-aiff'); $Arr['aifc']=array('audio/x-aiff'); $Arr['aiff']=array('audio/x-aiff'); $Arr['air']=array('application/vnd.adobe.air-application-installer-package+zip'); $Arr['ait']=array('application/vnd.dvb.ait'); $Arr['ami']=array('application/vnd.amiga.ami'); $Arr['apk']=array('application/vnd.android.package-archive'); $Arr['appcache']=array('text/cache-manifest'); $Arr['application']=array('application/x-ms-application'); $Arr['apr']=array('application/vnd.lotus-approach'); $Arr['arc']=array('application/x-freearc'); $Arr['asc']=array('application/pgp-signature'); $Arr['asf']=array('video/x-ms-asf'); $Arr['asm']=array('text/x-asm'); $Arr['aso']=array('application/vnd.accpac.simply.aso'); $Arr['asx']=array('video/x-ms-asf'); $Arr['atc']=array('application/vnd.acucorp'); $Arr['atom']=array('application/atom+xml'); $Arr['atomcat']=array('application/atomcat+xml'); $Arr['atomsvc']=array('application/atomsvc+xml'); $Arr['atx']=array('application/vnd.antix.game-component'); $Arr['au']=array('audio/basic'); $Arr['avi']=array('video/x-msvideo'); $Arr['aw']=array('application/applixware'); $Arr['azf']=array('application/vnd.airzip.filesecure.azf'); $Arr['azs']=array('application/vnd.airzip.filesecure.azs'); $Arr['azw']=array('application/vnd.amazon.ebook'); $Arr['bat']=array('application/x-msdownload'); $Arr['bcpio']=array('application/x-bcpio'); $Arr['bdf']=array('application/x-font-bdf'); $Arr['bdm']=array('application/vnd.syncml.dm+wbxml'); $Arr['bed']=array('application/vnd.realvnc.bed'); $Arr['bh2']=array('application/vnd.fujitsu.oasysprs'); $Arr['bin']=array('application/octet-stream'); $Arr['blb']=array('application/x-blorb'); $Arr['blorb']=array('application/x-blorb'); $Arr['bmi']=array('application/vnd.bmi'); $Arr['bmp']=array('image/bmp'); $Arr['book']=array('application/vnd.framemaker'); $Arr['box']=array('application/vnd.previewsystems.box'); $Arr['boz']=array('application/x-bzip2'); $Arr['bpk']=array('application/octet-stream'); $Arr['btif']=array('image/prs.btif'); $Arr['bz']=array('application/x-bzip'); $Arr['bz2']=array('application/x-bzip2'); $Arr['c']=array('text/x-c'); $Arr['c11amc']=array('application/vnd.cluetrust.cartomobile-config'); $Arr['c11amz']=array('application/vnd.cluetrust.cartomobile-config-pkg'); $Arr['c4d']=array('application/vnd.clonk.c4group'); $Arr['c4f']=array('application/vnd.clonk.c4group'); $Arr['c4g']=array('application/vnd.clonk.c4group'); $Arr['c4p']=array('application/vnd.clonk.c4group'); $Arr['c4u']=array('application/vnd.clonk.c4group'); $Arr['cab']=array('application/vnd.ms-cab-compressed'); $Arr['caf']=array('audio/x-caf'); $Arr['cap']=array('application/vnd.tcpdump.pcap'); $Arr['car']=array('application/vnd.curl.car'); $Arr['cat']=array('application/vnd.ms-pki.seccat'); $Arr['cb7']=array('application/x-cbr'); $Arr['cba']=array('application/x-cbr'); $Arr['cbr']=array('application/x-cbr'); $Arr['cbt']=array('application/x-cbr'); $Arr['cbz']=array('application/x-cbr'); $Arr['cc']=array('text/x-c'); $Arr['cct']=array('application/x-director'); $Arr['ccxml']=array('application/ccxml+xml'); $Arr['cdbcmsg']=array('application/vnd.contact.cmsg'); $Arr['cdf']=array('application/x-netcdf'); $Arr['cdkey']=array('application/vnd.mediastation.cdkey'); $Arr['cdmia']=array('application/cdmi-capability'); $Arr['cdmic']=array('application/cdmi-container'); $Arr['cdmid']=array('application/cdmi-domain'); $Arr['cdmio']=array('application/cdmi-object'); $Arr['cdmiq']=array('application/cdmi-queue'); $Arr['cdx']=array('chemical/x-cdx'); $Arr['cdxml']=array('application/vnd.chemdraw+xml'); $Arr['cdy']=array('application/vnd.cinderella'); $Arr['cer']=array('application/pkix-cert'); $Arr['cfs']=array('application/x-cfs-compressed'); $Arr['cgm']=array('image/cgm'); $Arr['chat']=array('application/x-chat'); $Arr['chm']=array('application/vnd.ms-htmlhelp'); $Arr['chrt']=array('application/vnd.kde.kchart'); $Arr['cif']=array('chemical/x-cif'); $Arr['cii']=array('application/vnd.anser-web-certificate-issue-initiation'); $Arr['cil']=array('application/vnd.ms-artgalry'); $Arr['cla']=array('application/vnd.claymore'); $Arr['class']=array('application/java-vm'); $Arr['clkk']=array('application/vnd.crick.clicker.keyboard'); $Arr['clkp']=array('application/vnd.crick.clicker.palette'); $Arr['clkt']=array('application/vnd.crick.clicker.template'); $Arr['clkw']=array('application/vnd.crick.clicker.wordbank'); $Arr['clkx']=array('application/vnd.crick.clicker'); $Arr['clp']=array('application/x-msclip'); $Arr['cmc']=array('application/vnd.cosmocaller'); $Arr['cmdf']=array('chemical/x-cmdf'); $Arr['cml']=array('chemical/x-cml'); $Arr['cmp']=array('application/vnd.yellowriver-custom-menu'); $Arr['cmx']=array('image/x-cmx'); $Arr['cod']=array('application/vnd.rim.cod'); $Arr['com']=array('application/x-msdownload'); $Arr['conf']=array('text/plain'); $Arr['cpio']=array('application/x-cpio'); $Arr['cpp']=array('text/x-c'); $Arr['cpt']=array('application/mac-compactpro'); $Arr['crd']=array('application/x-mscardfile'); $Arr['crl']=array('application/pkix-crl'); $Arr['crt']=array('application/x-x509-ca-cert'); $Arr['cryptonote']=array('application/vnd.rig.cryptonote'); $Arr['csh']=array('application/x-csh'); $Arr['csml']=array('chemical/x-csml'); $Arr['csp']=array('application/vnd.commonspace'); $Arr['css']=array('text/css'); $Arr['cst']=array('application/x-director'); $Arr['csv']=array('text/csv'); $Arr['cu']=array('application/cu-seeme'); $Arr['curl']=array('text/vnd.curl'); $Arr['cww']=array('application/prs.cww'); $Arr['cxt']=array('application/x-director'); $Arr['cxx']=array('text/x-c'); $Arr['dae']=array('model/vnd.collada+xml'); $Arr['daf']=array('application/vnd.mobius.daf'); $Arr['dart']=array('application/vnd.dart'); $Arr['dataless']=array('application/vnd.fdsn.seed'); $Arr['davmount']=array('application/davmount+xml'); $Arr['dbk']=array('application/docbook+xml'); $Arr['dcr']=array('application/x-director'); $Arr['dcurl']=array('text/vnd.curl.dcurl'); $Arr['dd2']=array('application/vnd.oma.dd2+xml'); $Arr['ddd']=array('application/vnd.fujixerox.ddd'); $Arr['deb']=array('application/x-debian-package'); $Arr['def']=array('text/plain'); $Arr['deploy']=array('application/octet-stream'); $Arr['der']=array('application/x-x509-ca-cert'); $Arr['dfac']=array('application/vnd.dreamfactory'); $Arr['dgc']=array('application/x-dgc-compressed'); $Arr['dic']=array('text/x-c'); $Arr['dir']=array('application/x-director'); $Arr['dis']=array('application/vnd.mobius.dis'); $Arr['dist']=array('application/octet-stream'); $Arr['distz']=array('application/octet-stream'); $Arr['djv']=array('image/vnd.djvu'); $Arr['djvu']=array('image/vnd.djvu'); $Arr['dll']=array('application/x-msdownload'); $Arr['dmg']=array('application/x-apple-diskimage'); $Arr['dmp']=array('application/vnd.tcpdump.pcap'); $Arr['dms']=array('application/octet-stream'); $Arr['dna']=array('application/vnd.dna'); $Arr['doc']=array('application/msword'); $Arr['docm']=array('application/vnd.ms-word.document.macroenabled.12'); $Arr['docx']=array('application/vnd.openxmlformats-officedocument.wordprocessingml.document'); $Arr['dot']=array('application/msword'); $Arr['dotm']=array('application/vnd.ms-word.template.macroenabled.12'); $Arr['dotx']=array('application/vnd.openxmlformats-officedocument.wordprocessingml.template'); $Arr['dp']=array('application/vnd.osgi.dp'); $Arr['dpg']=array('application/vnd.dpgraph'); $Arr['dra']=array('audio/vnd.dra'); $Arr['dsc']=array('text/prs.lines.tag'); $Arr['dssc']=array('application/dssc+der'); $Arr['dtb']=array('application/x-dtbook+xml'); $Arr['dtd']=array('application/xml-dtd'); $Arr['dts']=array('audio/vnd.dts'); $Arr['dtshd']=array('audio/vnd.dts.hd'); $Arr['dump']=array('application/octet-stream'); $Arr['dvb']=array('video/vnd.dvb.file'); $Arr['dvi']=array('application/x-dvi'); $Arr['dwf']=array('model/vnd.dwf'); $Arr['dwg']=array('image/vnd.dwg'); $Arr['dxf']=array('image/vnd.dxf'); $Arr['dxp']=array('application/vnd.spotfire.dxp'); $Arr['dxr']=array('application/x-director'); $Arr['ecelp4800']=array('audio/vnd.nuera.ecelp4800'); $Arr['ecelp7470']=array('audio/vnd.nuera.ecelp7470'); $Arr['ecelp9600']=array('audio/vnd.nuera.ecelp9600'); $Arr['ecma']=array('application/ecmascript'); $Arr['edm']=array('application/vnd.novadigm.edm'); $Arr['edx']=array('application/vnd.novadigm.edx'); $Arr['efif']=array('application/vnd.picsel'); $Arr['ei6']=array('application/vnd.pg.osasli'); $Arr['elc']=array('application/octet-stream'); $Arr['emf']=array('application/x-msmetafile'); $Arr['eml']=array('message/rfc822'); $Arr['emma']=array('application/emma+xml'); $Arr['emz']=array('application/x-msmetafile'); $Arr['eol']=array('audio/vnd.digital-winds'); $Arr['eot']=array('application/vnd.ms-fontobject'); $Arr['eps']=array('application/postscript'); $Arr['epub']=array('application/epub+zip'); $Arr['es3']=array('application/vnd.eszigno3+xml'); $Arr['esa']=array('application/vnd.osgi.subsystem'); $Arr['esf']=array('application/vnd.epson.esf'); $Arr['et3']=array('application/vnd.eszigno3+xml'); $Arr['etx']=array('text/x-setext'); $Arr['eva']=array('application/x-eva'); $Arr['evy']=array('application/x-envoy'); $Arr['exe']=array('application/x-msdownload'); $Arr['exi']=array('application/exi'); $Arr['ext']=array('application/vnd.novadigm.ext'); $Arr['ez']=array('application/andrew-inset'); $Arr['ez2']=array('application/vnd.ezpix-album'); $Arr['ez3']=array('application/vnd.ezpix-package'); $Arr['f']=array('text/x-fortran'); $Arr['f4v']=array('video/x-f4v'); $Arr['f77']=array('text/x-fortran'); $Arr['f90']=array('text/x-fortran'); $Arr['fbs']=array('image/vnd.fastbidsheet'); $Arr['fcdt']=array('application/vnd.adobe.formscentral.fcdt'); $Arr['fcs']=array('application/vnd.isac.fcs'); $Arr['fdf']=array('application/vnd.fdf'); $Arr['fe_launch']=array('application/vnd.denovo.fcselayout-link'); $Arr['fg5']=array('application/vnd.fujitsu.oasysgp'); $Arr['fgd']=array('application/x-director'); $Arr['fh']=array('image/x-freehand'); $Arr['fh4']=array('image/x-freehand'); $Arr['fh5']=array('image/x-freehand'); $Arr['fh7']=array('image/x-freehand'); $Arr['fhc']=array('image/x-freehand'); $Arr['fig']=array('application/x-xfig'); $Arr['flac']=array('audio/x-flac'); $Arr['fli']=array('video/x-fli'); $Arr['flo']=array('application/vnd.micrografx.flo'); $Arr['flv']=array('video/x-flv'); $Arr['flw']=array('application/vnd.kde.kivio'); $Arr['flx']=array('text/vnd.fmi.flexstor'); $Arr['fly']=array('text/vnd.fly'); $Arr['fm']=array('application/vnd.framemaker'); $Arr['fnc']=array('application/vnd.frogans.fnc'); $Arr['for']=array('text/x-fortran'); $Arr['fpx']=array('image/vnd.fpx'); $Arr['frame']=array('application/vnd.framemaker'); $Arr['fsc']=array('application/vnd.fsc.weblaunch'); $Arr['fst']=array('image/vnd.fst'); $Arr['ftc']=array('application/vnd.fluxtime.clip'); $Arr['fti']=array('application/vnd.anser-web-funds-transfer-initiation'); $Arr['fvt']=array('video/vnd.fvt'); $Arr['fxp']=array('application/vnd.adobe.fxp'); $Arr['fxpl']=array('application/vnd.adobe.fxp'); $Arr['fzs']=array('application/vnd.fuzzysheet'); $Arr['g2w']=array('application/vnd.geoplan'); $Arr['g3']=array('image/g3fax'); $Arr['g3w']=array('application/vnd.geospace'); $Arr['gac']=array('application/vnd.groove-account'); $Arr['gam']=array('application/x-tads'); $Arr['gbr']=array('application/rpki-ghostbusters'); $Arr['gca']=array('application/x-gca-compressed'); $Arr['gdl']=array('model/vnd.gdl'); $Arr['geo']=array('application/vnd.dynageo'); $Arr['gex']=array('application/vnd.geometry-explorer'); $Arr['ggb']=array('application/vnd.geogebra.file'); $Arr['ggs']=array('application/vnd.geogebra.slides'); $Arr['ggt']=array('application/vnd.geogebra.tool'); $Arr['ghf']=array('application/vnd.groove-help'); $Arr['gif']=array('image/gif'); $Arr['gim']=array('application/vnd.groove-identity-message'); $Arr['gml']=array('application/gml+xml'); $Arr['gmx']=array('application/vnd.gmx'); $Arr['gnumeric']=array('application/x-gnumeric'); $Arr['gph']=array('application/vnd.flographit'); $Arr['gpx']=array('application/gpx+xml'); $Arr['gqf']=array('application/vnd.grafeq'); $Arr['gqs']=array('application/vnd.grafeq'); $Arr['gram']=array('application/srgs'); $Arr['gramps']=array('application/x-gramps-xml'); $Arr['gre']=array('application/vnd.geometry-explorer'); $Arr['grv']=array('application/vnd.groove-injector'); $Arr['grxml']=array('application/srgs+xml'); $Arr['gsf']=array('application/x-font-ghostscript'); $Arr['gtar']=array('application/x-gtar'); $Arr['gtm']=array('application/vnd.groove-tool-message'); $Arr['gtw']=array('model/vnd.gtw'); $Arr['gv']=array('text/vnd.graphviz'); $Arr['gxf']=array('application/gxf'); $Arr['gxt']=array('application/vnd.geonext'); $Arr['h']=array('text/x-c'); $Arr['h261']=array('video/h261'); $Arr['h263']=array('video/h263'); $Arr['h264']=array('video/h264'); $Arr['hal']=array('application/vnd.hal+xml'); $Arr['hbci']=array('application/vnd.hbci'); $Arr['hdf']=array('application/x-hdf'); $Arr['hh']=array('text/x-c'); $Arr['hlp']=array('application/winhlp'); $Arr['hpgl']=array('application/vnd.hp-hpgl'); $Arr['hpid']=array('application/vnd.hp-hpid'); $Arr['hps']=array('application/vnd.hp-hps'); $Arr['hqx']=array('application/mac-binhex40'); $Arr['htke']=array('application/vnd.kenameaapp'); $Arr['htm']=array('text/html'); $Arr['html']=array('text/html'); $Arr['hvd']=array('application/vnd.yamaha.hv-dic'); $Arr['hvp']=array('application/vnd.yamaha.hv-voice'); $Arr['hvs']=array('application/vnd.yamaha.hv-script'); $Arr['i2g']=array('application/vnd.intergeo'); $Arr['icc']=array('application/vnd.iccprofile'); $Arr['ice']=array('x-conference/x-cooltalk'); $Arr['icm']=array('application/vnd.iccprofile'); $Arr['ico']=array('image/x-icon'); $Arr['ics']=array('text/calendar'); $Arr['ief']=array('image/ief'); $Arr['ifb']=array('text/calendar'); $Arr['ifm']=array('application/vnd.shana.informed.formdata'); $Arr['iges']=array('model/iges'); $Arr['igl']=array('application/vnd.igloader'); $Arr['igm']=array('application/vnd.insors.igm'); $Arr['igs']=array('model/iges'); $Arr['igx']=array('application/vnd.micrografx.igx'); $Arr['iif']=array('application/vnd.shana.informed.interchange'); $Arr['imp']=array('application/vnd.accpac.simply.imp'); $Arr['ims']=array('application/vnd.ms-ims'); $Arr['in']=array('text/plain'); $Arr['ink']=array('application/inkml+xml'); $Arr['inkml']=array('application/inkml+xml'); $Arr['install']=array('application/x-install-instructions'); $Arr['iota']=array('application/vnd.astraea-software.iota'); $Arr['ipfix']=array('application/ipfix'); $Arr['ipk']=array('application/vnd.shana.informed.package'); $Arr['irm']=array('application/vnd.ibm.rights-management'); $Arr['irp']=array('application/vnd.irepository.package+xml'); $Arr['iso']=array('application/x-iso9660-image'); $Arr['itp']=array('application/vnd.shana.informed.formtemplate'); $Arr['ivp']=array('application/vnd.immervision-ivp'); $Arr['ivu']=array('application/vnd.immervision-ivu'); $Arr['jad']=array('text/vnd.sun.j2me.app-descriptor'); $Arr['jam']=array('application/vnd.jam'); $Arr['jar']=array('application/java-archive'); $Arr['java']=array('text/x-java-source'); $Arr['jisp']=array('application/vnd.jisp'); $Arr['jlt']=array('application/vnd.hp-jlyt'); $Arr['jnlp']=array('application/x-java-jnlp-file'); $Arr['joda']=array('application/vnd.joost.joda-archive'); $Arr['jpe']=array('image/jpeg'); $Arr['jpeg']=array('image/jpeg'); $Arr['jpg']=array('image/jpeg'); $Arr['jpgm']=array('video/jpm'); $Arr['jpgv']=array('video/jpeg'); $Arr['jpm']=array('video/jpm'); $Arr['js']=array('text/javascript'); $Arr['json']=array('application/json'); $Arr['jsonml']=array('application/jsonml+json'); $Arr['kar']=array('audio/midi'); $Arr['karbon']=array('application/vnd.kde.karbon'); $Arr['kfo']=array('application/vnd.kde.kformula'); $Arr['kia']=array('application/vnd.kidspiration'); $Arr['kml']=array('application/vnd.google-earth.kml+xml'); $Arr['kmz']=array('application/vnd.google-earth.kmz'); $Arr['kne']=array('application/vnd.kinar'); $Arr['knp']=array('application/vnd.kinar'); $Arr['kon']=array('application/vnd.kde.kontour'); $Arr['kpr']=array('application/vnd.kde.kpresenter'); $Arr['kpt']=array('application/vnd.kde.kpresenter'); $Arr['kpxx']=array('application/vnd.ds-keypoint'); $Arr['ksp']=array('application/vnd.kde.kspread'); $Arr['ktr']=array('application/vnd.kahootz'); $Arr['ktx']=array('image/ktx'); $Arr['ktz']=array('application/vnd.kahootz'); $Arr['kwd']=array('application/vnd.kde.kword'); $Arr['kwt']=array('application/vnd.kde.kword'); $Arr['lasxml']=array('application/vnd.las.las+xml'); $Arr['latex']=array('application/x-latex'); $Arr['lbd']=array('application/vnd.llamagraphics.life-balance.desktop'); $Arr['lbe']=array('application/vnd.llamagraphics.life-balance.exchange+xml'); $Arr['les']=array('application/vnd.hhe.lesson-player'); $Arr['lha']=array('application/x-lzh-compressed'); $Arr['link66']=array('application/vnd.route66.link66+xml'); $Arr['list']=array('text/plain'); $Arr['list3820']=array('application/vnd.ibm.modcap'); $Arr['listafp']=array('application/vnd.ibm.modcap'); $Arr['lnk']=array('application/x-ms-shortcut'); $Arr['log']=array('text/plain'); $Arr['lostxml']=array('application/lost+xml'); $Arr['lrf']=array('application/octet-stream'); $Arr['lrm']=array('application/vnd.ms-lrm'); $Arr['ltf']=array('application/vnd.frogans.ltf'); $Arr['lvp']=array('audio/vnd.lucent.voice'); $Arr['lwp']=array('application/vnd.lotus-wordpro'); $Arr['lzh']=array('application/x-lzh-compressed'); $Arr['m13']=array('application/x-msmediaview'); $Arr['m14']=array('application/x-msmediaview'); $Arr['m1v']=array('video/mpeg'); $Arr['m21']=array('application/mp21'); $Arr['m2a']=array('audio/mpeg'); $Arr['m2v']=array('video/mpeg'); $Arr['m3a']=array('audio/mpeg'); $Arr['m3u']=array('audio/x-mpegurl'); $Arr['m3u8']=array('application/vnd.apple.mpegurl'); $Arr['m4a']=array('audio/mp4'); $Arr['m4u']=array('video/vnd.mpegurl'); $Arr['m4v']=array('video/x-m4v'); $Arr['ma']=array('application/mathematica'); $Arr['mads']=array('application/mads+xml'); $Arr['mag']=array('application/vnd.ecowin.chart'); $Arr['maker']=array('application/vnd.framemaker'); $Arr['man']=array('text/troff'); $Arr['mar']=array('application/octet-stream'); $Arr['mathml']=array('application/mathml+xml'); $Arr['mb']=array('application/mathematica'); $Arr['mbk']=array('application/vnd.mobius.mbk'); $Arr['mbox']=array('application/mbox'); $Arr['mc1']=array('application/vnd.medcalcdata'); $Arr['mcd']=array('application/vnd.mcd'); $Arr['mcurl']=array('text/vnd.curl.mcurl'); $Arr['mdb']=array('application/x-msaccess'); $Arr['mdi']=array('image/vnd.ms-modi'); $Arr['me']=array('text/troff'); $Arr['mesh']=array('model/mesh'); $Arr['meta4']=array('application/metalink4+xml'); $Arr['metalink']=array('application/metalink+xml'); $Arr['mets']=array('application/mets+xml'); $Arr['mfm']=array('application/vnd.mfmp'); $Arr['mft']=array('application/rpki-manifest'); $Arr['mgp']=array('application/vnd.osgeo.mapguide.package'); $Arr['mgz']=array('application/vnd.proteus.magazine'); $Arr['mid']=array('audio/midi'); $Arr['midi']=array('audio/midi'); $Arr['mie']=array('application/x-mie'); $Arr['mif']=array('application/vnd.mif'); $Arr['mime']=array('message/rfc822'); $Arr['mj2']=array('video/mj2'); $Arr['mjp2']=array('video/mj2'); $Arr['mjs']=array('text/javascript'); $Arr['mk3d']=array('video/x-matroska'); $Arr['mka']=array('audio/x-matroska'); $Arr['mks']=array('video/x-matroska'); $Arr['mkv']=array('video/x-matroska'); $Arr['mlp']=array('application/vnd.dolby.mlp'); $Arr['mmd']=array('application/vnd.chipnuts.karaoke-mmd'); $Arr['mmf']=array('application/vnd.smaf'); $Arr['mmr']=array('image/vnd.fujixerox.edmics-mmr'); $Arr['mng']=array('video/x-mng'); $Arr['mny']=array('application/x-msmoney'); $Arr['mobi']=array('application/x-mobipocket-ebook'); $Arr['mods']=array('application/mods+xml'); $Arr['mov']=array('video/quicktime'); $Arr['movie']=array('video/x-sgi-movie'); $Arr['mp2']=array('audio/mpeg'); $Arr['mp21']=array('application/mp21'); $Arr['mp2a']=array('audio/mpeg'); $Arr['mp3']=array('audio/mpeg'); $Arr['mp4']=array('video/mp4'); $Arr['mp4a']=array('audio/mp4'); $Arr['mp4s']=array('application/mp4'); $Arr['mp4v']=array('video/mp4'); $Arr['mpc']=array('application/vnd.mophun.certificate'); $Arr['mpe']=array('video/mpeg'); $Arr['mpeg']=array('video/mpeg'); $Arr['mpg']=array('video/mpeg'); $Arr['mpg4']=array('video/mp4'); $Arr['mpga']=array('audio/mpeg'); $Arr['mpkg']=array('application/vnd.apple.installer+xml'); $Arr['mpm']=array('application/vnd.blueice.multipass'); $Arr['mpn']=array('application/vnd.mophun.application'); $Arr['mpp']=array('application/vnd.ms-project'); $Arr['mpt']=array('application/vnd.ms-project'); $Arr['mpy']=array('application/vnd.ibm.minipay'); $Arr['mqy']=array('application/vnd.mobius.mqy'); $Arr['mrc']=array('application/marc'); $Arr['mrcx']=array('application/marcxml+xml'); $Arr['ms']=array('text/troff'); $Arr['mscml']=array('application/mediaservercontrol+xml'); $Arr['mseed']=array('application/vnd.fdsn.mseed'); $Arr['mseq']=array('application/vnd.mseq'); $Arr['msf']=array('application/vnd.epson.msf'); $Arr['msh']=array('model/mesh'); $Arr['msi']=array('application/x-msdownload'); $Arr['msl']=array('application/vnd.mobius.msl'); $Arr['msty']=array('application/vnd.muvee.style'); $Arr['mts']=array('model/vnd.mts'); $Arr['mus']=array('application/vnd.musician'); $Arr['musicxml']=array('application/vnd.recordare.musicxml+xml'); $Arr['mvb']=array('application/x-msmediaview'); $Arr['mwf']=array('application/vnd.mfer'); $Arr['mxf']=array('application/mxf'); $Arr['mxl']=array('application/vnd.recordare.musicxml'); $Arr['mxml']=array('application/xv+xml'); $Arr['mxs']=array('application/vnd.triscape.mxs'); $Arr['mxu']=array('video/vnd.mpegurl'); $Arr['n-gage']=array('application/vnd.nokia.n-gage.symbian.install'); $Arr['n3']=array('text/n3'); $Arr['nb']=array('application/mathematica'); $Arr['nbp']=array('application/vnd.wolfram.player'); $Arr['nc']=array('application/x-netcdf'); $Arr['ncx']=array('application/x-dtbncx+xml'); $Arr['nfo']=array('text/x-nfo'); $Arr['ngdat']=array('application/vnd.nokia.n-gage.data'); $Arr['nitf']=array('application/vnd.nitf'); $Arr['nlu']=array('application/vnd.neurolanguage.nlu'); $Arr['nml']=array('application/vnd.enliven'); $Arr['nnd']=array('application/vnd.noblenet-directory'); $Arr['nns']=array('application/vnd.noblenet-sealer'); $Arr['nnw']=array('application/vnd.noblenet-web'); $Arr['npx']=array('image/vnd.net-fpx'); $Arr['nsc']=array('application/x-conference'); $Arr['nsf']=array('application/vnd.lotus-notes'); $Arr['ntf']=array('application/vnd.nitf'); $Arr['nzb']=array('application/x-nzb'); $Arr['oa2']=array('application/vnd.fujitsu.oasys2'); $Arr['oa3']=array('application/vnd.fujitsu.oasys3'); $Arr['oas']=array('application/vnd.fujitsu.oasys'); $Arr['obd']=array('application/x-msbinder'); $Arr['obj']=array('application/x-tgif'); $Arr['oda']=array('application/oda'); $Arr['odb']=array('application/vnd.oasis.opendocument.database'); $Arr['odc']=array('application/vnd.oasis.opendocument.chart'); $Arr['odf']=array('application/vnd.oasis.opendocument.formula'); $Arr['odft']=array('application/vnd.oasis.opendocument.formula-template'); $Arr['odg']=array('application/vnd.oasis.opendocument.graphics'); $Arr['odi']=array('application/vnd.oasis.opendocument.image'); $Arr['odm']=array('application/vnd.oasis.opendocument.text-master'); $Arr['odp']=array('application/vnd.oasis.opendocument.presentation'); $Arr['ods']=array('application/vnd.oasis.opendocument.spreadsheet'); $Arr['odt']=array('application/vnd.oasis.opendocument.text'); $Arr['oga']=array('audio/ogg'); $Arr['ogg']=array('audio/ogg'); $Arr['ogv']=array('video/ogg'); $Arr['ogx']=array('application/ogg'); $Arr['omdoc']=array('application/omdoc+xml'); $Arr['onepkg']=array('application/onenote'); $Arr['onetmp']=array('application/onenote'); $Arr['onetoc']=array('application/onenote'); $Arr['onetoc2']=array('application/onenote'); $Arr['opf']=array('application/oebps-package+xml'); $Arr['opml']=array('text/x-opml'); $Arr['oprc']=array('application/vnd.palm'); $Arr['opus']=array('audio/ogg'); $Arr['org']=array('application/vnd.lotus-organizer'); $Arr['osf']=array('application/vnd.yamaha.openscoreformat'); $Arr['osfpvg']=array('application/vnd.yamaha.openscoreformat.osfpvg+xml'); $Arr['otc']=array('application/vnd.oasis.opendocument.chart-template'); $Arr['otf']=array('font/otf'); $Arr['otg']=array('application/vnd.oasis.opendocument.graphics-template'); $Arr['oth']=array('application/vnd.oasis.opendocument.text-web'); $Arr['oti']=array('application/vnd.oasis.opendocument.image-template'); $Arr['otp']=array('application/vnd.oasis.opendocument.presentation-template'); $Arr['ots']=array('application/vnd.oasis.opendocument.spreadsheet-template'); $Arr['ott']=array('application/vnd.oasis.opendocument.text-template'); $Arr['oxps']=array('application/oxps'); $Arr['oxt']=array('application/vnd.openofficeorg.extension'); $Arr['p']=array('text/x-pascal'); $Arr['p10']=array('application/pkcs10'); $Arr['p12']=array('application/x-pkcs12'); $Arr['p7b']=array('application/x-pkcs7-certificates'); $Arr['p7c']=array('application/pkcs7-mime'); $Arr['p7m']=array('application/pkcs7-mime'); $Arr['p7r']=array('application/x-pkcs7-certreqresp'); $Arr['p7s']=array('application/pkcs7-signature'); $Arr['p8']=array('application/pkcs8'); $Arr['pas']=array('text/x-pascal'); $Arr['paw']=array('application/vnd.pawaafile'); $Arr['pbd']=array('application/vnd.powerbuilder6'); $Arr['pbm']=array('image/x-portable-bitmap'); $Arr['pcap']=array('application/vnd.tcpdump.pcap'); $Arr['pcf']=array('application/x-font-pcf'); $Arr['pcl']=array('application/vnd.hp-pcl'); $Arr['pclxl']=array('application/vnd.hp-pclxl'); $Arr['pct']=array('image/x-pict'); $Arr['pcurl']=array('application/vnd.curl.pcurl'); $Arr['pcx']=array('image/x-pcx'); $Arr['pdb']=array('application/vnd.palm'); $Arr['pdf']=array('application/pdf'); $Arr['pfa']=array('application/x-font-type1'); $Arr['pfb']=array('application/x-font-type1'); $Arr['pfm']=array('application/x-font-type1'); $Arr['pfr']=array('application/font-tdpfr'); $Arr['pfx']=array('application/x-pkcs12'); $Arr['pgm']=array('image/x-portable-graymap'); $Arr['pgn']=array('application/x-chess-pgn'); $Arr['pgp']=array('application/pgp-encrypted'); $Arr['pic']=array('image/x-pict'); $Arr['pkg']=array('application/octet-stream'); $Arr['pki']=array('application/pkixcmp'); $Arr['pkipath']=array('application/pkix-pkipath'); $Arr['plb']=array('application/vnd.3gpp.pic-bw-large'); $Arr['plc']=array('application/vnd.mobius.plc'); $Arr['plf']=array('application/vnd.pocketlearn'); $Arr['pls']=array('application/pls+xml'); $Arr['pml']=array('application/vnd.ctc-posml'); $Arr['png']=array('image/png'); $Arr['pnm']=array('image/x-portable-anymap'); $Arr['portpkg']=array('application/vnd.macports.portpkg'); $Arr['pot']=array('application/vnd.ms-powerpoint'); $Arr['potm']=array('application/vnd.ms-powerpoint.template.macroenabled.12'); $Arr['potx']=array('application/vnd.openxmlformats-officedocument.presentationml.template'); $Arr['ppam']=array('application/vnd.ms-powerpoint.addin.macroenabled.12'); $Arr['ppd']=array('application/vnd.cups-ppd'); $Arr['ppm']=array('image/x-portable-pixmap'); $Arr['pps']=array('application/vnd.ms-powerpoint'); $Arr['ppsm']=array('application/vnd.ms-powerpoint.slideshow.macroenabled.12'); $Arr['ppsx']=array('application/vnd.openxmlformats-officedocument.presentationml.slideshow'); $Arr['ppt']=array('application/vnd.ms-powerpoint'); $Arr['pptm']=array('application/vnd.ms-powerpoint.presentation.macroenabled.12'); $Arr['pptx']=array('application/vnd.openxmlformats-officedocument.presentationml.presentation'); $Arr['pqa']=array('application/vnd.palm'); $Arr['prc']=array('application/x-mobipocket-ebook'); $Arr['pre']=array('application/vnd.lotus-freelance'); $Arr['prf']=array('application/pics-rules'); $Arr['ps']=array('application/postscript'); $Arr['psb']=array('application/vnd.3gpp.pic-bw-small'); $Arr['psd']=array('image/vnd.adobe.photoshop'); $Arr['psf']=array('application/x-font-linux-psf'); $Arr['pskcxml']=array('application/pskc+xml'); $Arr['ptid']=array('application/vnd.pvi.ptid1'); $Arr['pub']=array('application/x-mspublisher'); $Arr['pvb']=array('application/vnd.3gpp.pic-bw-var'); $Arr['pwn']=array('application/vnd.3m.post-it-notes'); $Arr['pya']=array('audio/vnd.ms-playready.media.pya'); $Arr['pyv']=array('video/vnd.ms-playready.media.pyv'); $Arr['qam']=array('application/vnd.epson.quickanime'); $Arr['qbo']=array('application/vnd.intu.qbo'); $Arr['qfx']=array('application/vnd.intu.qfx'); $Arr['qps']=array('application/vnd.publishare-delta-tree'); $Arr['qt']=array('video/quicktime'); $Arr['qwd']=array('application/vnd.quark.quarkxpress'); $Arr['qwt']=array('application/vnd.quark.quarkxpress'); $Arr['qxb']=array('application/vnd.quark.quarkxpress'); $Arr['qxd']=array('application/vnd.quark.quarkxpress'); $Arr['qxl']=array('application/vnd.quark.quarkxpress'); $Arr['qxt']=array('application/vnd.quark.quarkxpress'); $Arr['ra']=array('audio/x-pn-realaudio'); $Arr['ram']=array('audio/x-pn-realaudio'); $Arr['rar']=array('application/x-rar-compressed'); $Arr['ras']=array('image/x-cmu-raster'); $Arr['rcprofile']=array('application/vnd.ipunplugged.rcprofile'); $Arr['rdf']=array('application/rdf+xml'); $Arr['rdz']=array('application/vnd.data-vision.rdz'); $Arr['rep']=array('application/vnd.businessobjects'); $Arr['res']=array('application/x-dtbresource+xml'); $Arr['rgb']=array('image/x-rgb'); $Arr['rif']=array('application/reginfo+xml'); $Arr['rip']=array('audio/vnd.rip'); $Arr['ris']=array('application/x-research-info-systems'); $Arr['rl']=array('application/resource-lists+xml'); $Arr['rlc']=array('image/vnd.fujixerox.edmics-rlc'); $Arr['rld']=array('application/resource-lists-diff+xml'); $Arr['rm']=array('application/vnd.rn-realmedia'); $Arr['rmi']=array('audio/midi'); $Arr['rmp']=array('audio/x-pn-realaudio-plugin'); $Arr['rms']=array('application/vnd.jcp.javame.midlet-rms'); $Arr['rmvb']=array('application/vnd.rn-realmedia-vbr'); $Arr['rnc']=array('application/relax-ng-compact-syntax'); $Arr['roa']=array('application/rpki-roa'); $Arr['roff']=array('text/troff'); $Arr['rp9']=array('application/vnd.cloanto.rp9'); $Arr['rpss']=array('application/vnd.nokia.radio-presets'); $Arr['rpst']=array('application/vnd.nokia.radio-preset'); $Arr['rq']=array('application/sparql-query'); $Arr['rs']=array('application/rls-services+xml'); $Arr['rsd']=array('application/rsd+xml'); $Arr['rss']=array('application/rss+xml'); $Arr['rtf']=array('application/rtf'); $Arr['rtx']=array('text/richtext'); $Arr['s']=array('text/x-asm'); $Arr['s3m']=array('audio/s3m'); $Arr['saf']=array('application/vnd.yamaha.smaf-audio'); $Arr['sbml']=array('application/sbml+xml'); $Arr['sc']=array('application/vnd.ibm.secure-container'); $Arr['scd']=array('application/x-msschedule'); $Arr['scm']=array('application/vnd.lotus-screencam'); $Arr['scq']=array('application/scvp-cv-request'); $Arr['scs']=array('application/scvp-cv-response'); $Arr['scurl']=array('text/vnd.curl.scurl'); $Arr['sda']=array('application/vnd.stardivision.draw'); $Arr['sdc']=array('application/vnd.stardivision.calc'); $Arr['sdd']=array('application/vnd.stardivision.impress'); $Arr['sdkd']=array('application/vnd.solent.sdkm+xml'); $Arr['sdkm']=array('application/vnd.solent.sdkm+xml'); $Arr['sdp']=array('application/sdp'); $Arr['sdw']=array('application/vnd.stardivision.writer'); $Arr['see']=array('application/vnd.seemail'); $Arr['seed']=array('application/vnd.fdsn.seed'); $Arr['sema']=array('application/vnd.sema'); $Arr['semd']=array('application/vnd.semd'); $Arr['semf']=array('application/vnd.semf'); $Arr['ser']=array('application/java-serialized-object'); $Arr['setpay']=array('application/set-payment-initiation'); $Arr['setreg']=array('application/set-registration-initiation'); $Arr['sfd-hdstx']=array('application/vnd.hydrostatix.sof-data'); $Arr['sfs']=array('application/vnd.spotfire.sfs'); $Arr['sfv']=array('text/x-sfv'); $Arr['sgi']=array('image/sgi'); $Arr['sgl']=array('application/vnd.stardivision.writer-global'); $Arr['sgm']=array('text/sgml'); $Arr['sgml']=array('text/sgml'); $Arr['sh']=array('application/x-sh'); $Arr['shar']=array('application/x-shar'); $Arr['shf']=array('application/shf+xml'); $Arr['sid']=array('image/x-mrsid-image'); $Arr['sig']=array('application/pgp-signature'); $Arr['sil']=array('audio/silk'); $Arr['silo']=array('model/mesh'); $Arr['sis']=array('application/vnd.symbian.install'); $Arr['sisx']=array('application/vnd.symbian.install'); $Arr['sit']=array('application/x-stuffit'); $Arr['sitx']=array('application/x-stuffitx'); $Arr['skd']=array('application/vnd.koan'); $Arr['skm']=array('application/vnd.koan'); $Arr['skp']=array('application/vnd.koan'); $Arr['skt']=array('application/vnd.koan'); $Arr['sldm']=array('application/vnd.ms-powerpoint.slide.macroenabled.12'); $Arr['sldx']=array('application/vnd.openxmlformats-officedocument.presentationml.slide'); $Arr['slt']=array('application/vnd.epson.salt'); $Arr['sm']=array('application/vnd.stepmania.stepchart'); $Arr['smf']=array('application/vnd.stardivision.math'); $Arr['smi']=array('application/smil+xml'); $Arr['smil']=array('application/smil+xml'); $Arr['smv']=array('video/x-smv'); $Arr['smzip']=array('application/vnd.stepmania.package'); $Arr['snd']=array('audio/basic'); $Arr['snf']=array('application/x-font-snf'); $Arr['so']=array('application/octet-stream'); $Arr['spc']=array('application/x-pkcs7-certificates'); $Arr['spf']=array('application/vnd.yamaha.smaf-phrase'); $Arr['spl']=array('application/x-futuresplash'); $Arr['spot']=array('text/vnd.in3d.spot'); $Arr['spp']=array('application/scvp-vp-response'); $Arr['spq']=array('application/scvp-vp-request'); $Arr['spx']=array('audio/ogg'); $Arr['sql']=array('application/x-sql'); $Arr['src']=array('application/x-wais-source'); $Arr['srt']=array('application/x-subrip'); $Arr['sru']=array('application/sru+xml'); $Arr['srx']=array('application/sparql-results+xml'); $Arr['ssdl']=array('application/ssdl+xml'); $Arr['sse']=array('application/vnd.kodak-descriptor'); $Arr['ssf']=array('application/vnd.epson.ssf'); $Arr['ssml']=array('application/ssml+xml'); $Arr['st']=array('application/vnd.sailingtracker.track'); $Arr['stc']=array('application/vnd.sun.xml.calc.template'); $Arr['std']=array('application/vnd.sun.xml.draw.template'); $Arr['stf']=array('application/vnd.wt.stf'); $Arr['sti']=array('application/vnd.sun.xml.impress.template'); $Arr['stk']=array('application/hyperstudio'); $Arr['stl']=array('application/vnd.ms-pki.stl'); $Arr['str']=array('application/vnd.pg.format'); $Arr['stw']=array('application/vnd.sun.xml.writer.template'); $Arr['sub']=array('image/vnd.dvb.subtitle','text/vnd.dvb.subtitle'); $Arr['sus']=array('application/vnd.sus-calendar'); $Arr['susp']=array('application/vnd.sus-calendar'); $Arr['sv4cpio']=array('application/x-sv4cpio'); $Arr['sv4crc']=array('application/x-sv4crc'); $Arr['svc']=array('application/vnd.dvb.service'); $Arr['svd']=array('application/vnd.svd'); $Arr['svg']=array('image/svg+xml'); $Arr['svgz']=array('image/svg+xml'); $Arr['swa']=array('application/x-director'); $Arr['swf']=array('application/x-shockwave-flash'); $Arr['swi']=array('application/vnd.aristanetworks.swi'); $Arr['sxc']=array('application/vnd.sun.xml.calc'); $Arr['sxd']=array('application/vnd.sun.xml.draw'); $Arr['sxg']=array('application/vnd.sun.xml.writer.global'); $Arr['sxi']=array('application/vnd.sun.xml.impress'); $Arr['sxm']=array('application/vnd.sun.xml.math'); $Arr['sxw']=array('application/vnd.sun.xml.writer'); $Arr['t']=array('text/troff'); $Arr['t3']=array('application/x-t3vm-image'); $Arr['taglet']=array('application/vnd.mynfc'); $Arr['tao']=array('application/vnd.tao.intent-module-archive'); $Arr['tar']=array('application/x-tar'); $Arr['tcap']=array('application/vnd.3gpp2.tcap'); $Arr['tcl']=array('application/x-tcl'); $Arr['teacher']=array('application/vnd.smart.teacher'); $Arr['tei']=array('application/tei+xml'); $Arr['teicorpus']=array('application/tei+xml'); $Arr['tex']=array('application/x-tex'); $Arr['texi']=array('application/x-texinfo'); $Arr['texinfo']=array('application/x-texinfo'); $Arr['text']=array('text/plain'); $Arr['tfi']=array('application/thraud+xml'); $Arr['tfm']=array('application/x-tex-tfm'); $Arr['tga']=array('image/x-tga'); $Arr['thmx']=array('application/vnd.ms-officetheme'); $Arr['tif']=array('image/tiff'); $Arr['tiff']=array('image/tiff'); $Arr['tmo']=array('application/vnd.tmobile-livetv'); $Arr['torrent']=array('application/x-bittorrent'); $Arr['tpl']=array('application/vnd.groove-tool-template'); $Arr['tpt']=array('application/vnd.trid.tpt'); $Arr['tr']=array('text/troff'); $Arr['tra']=array('application/vnd.trueapp'); $Arr['trm']=array('application/x-msterminal'); $Arr['tsd']=array('application/timestamped-data'); $Arr['tsv']=array('text/tab-separated-values'); $Arr['ttc']=array('font/collection'); $Arr['ttf']=array('font/ttf'); $Arr['ttl']=array('text/turtle'); $Arr['twd']=array('application/vnd.simtech-mindmapper'); $Arr['twds']=array('application/vnd.simtech-mindmapper'); $Arr['txd']=array('application/vnd.genomatix.tuxedo'); $Arr['txf']=array('application/vnd.mobius.txf'); $Arr['txt']=array('text/plain'); $Arr['u32']=array('application/x-authorware-bin'); $Arr['udeb']=array('application/x-debian-package'); $Arr['ufd']=array('application/vnd.ufdl'); $Arr['ufdl']=array('application/vnd.ufdl'); $Arr['ulx']=array('application/x-glulx'); $Arr['umj']=array('application/vnd.umajin'); $Arr['unityweb']=array('application/vnd.unity'); $Arr['uoml']=array('application/vnd.uoml+xml'); $Arr['uri']=array('text/uri-list'); $Arr['uris']=array('text/uri-list'); $Arr['urls']=array('text/uri-list'); $Arr['ustar']=array('application/x-ustar'); $Arr['utz']=array('application/vnd.uiq.theme'); $Arr['uu']=array('text/x-uuencode'); $Arr['uva']=array('audio/vnd.dece.audio'); $Arr['uvd']=array('application/vnd.dece.data'); $Arr['uvf']=array('application/vnd.dece.data'); $Arr['uvg']=array('image/vnd.dece.graphic'); $Arr['uvh']=array('video/vnd.dece.hd'); $Arr['uvi']=array('image/vnd.dece.graphic'); $Arr['uvm']=array('video/vnd.dece.mobile'); $Arr['uvp']=array('video/vnd.dece.pd'); $Arr['uvs']=array('video/vnd.dece.sd'); $Arr['uvt']=array('application/vnd.dece.ttml+xml'); $Arr['uvu']=array('video/vnd.uvvu.mp4'); $Arr['uvv']=array('video/vnd.dece.video'); $Arr['uvva']=array('audio/vnd.dece.audio'); $Arr['uvvd']=array('application/vnd.dece.data'); $Arr['uvvf']=array('application/vnd.dece.data'); $Arr['uvvg']=array('image/vnd.dece.graphic'); $Arr['uvvh']=array('video/vnd.dece.hd'); $Arr['uvvi']=array('image/vnd.dece.graphic'); $Arr['uvvm']=array('video/vnd.dece.mobile'); $Arr['uvvp']=array('video/vnd.dece.pd'); $Arr['uvvs']=array('video/vnd.dece.sd'); $Arr['uvvt']=array('application/vnd.dece.ttml+xml'); $Arr['uvvu']=array('video/vnd.uvvu.mp4'); $Arr['uvvv']=array('video/vnd.dece.video'); $Arr['uvvx']=array('application/vnd.dece.unspecified'); $Arr['uvvz']=array('application/vnd.dece.zip'); $Arr['uvx']=array('application/vnd.dece.unspecified'); $Arr['uvz']=array('application/vnd.dece.zip'); $Arr['vcard']=array('text/vcard'); $Arr['vcd']=array('application/x-cdlink'); $Arr['vcf']=array('text/x-vcard'); $Arr['vcg']=array('application/vnd.groove-vcard'); $Arr['vcs']=array('text/x-vcalendar'); $Arr['vcx']=array('application/vnd.vcx'); $Arr['vis']=array('application/vnd.visionary'); $Arr['viv']=array('video/vnd.vivo'); $Arr['vob']=array('video/x-ms-vob'); $Arr['vor']=array('application/vnd.stardivision.writer'); $Arr['vox']=array('application/x-authorware-bin'); $Arr['vrml']=array('model/vrml'); $Arr['vsd']=array('application/vnd.visio'); $Arr['vsf']=array('application/vnd.vsf'); $Arr['vss']=array('application/vnd.visio'); $Arr['vst']=array('application/vnd.visio'); $Arr['vsw']=array('application/vnd.visio'); $Arr['vtu']=array('model/vnd.vtu'); $Arr['vxml']=array('application/voicexml+xml'); $Arr['w3d']=array('application/x-director'); $Arr['wad']=array('application/x-doom'); $Arr['wasm']=array('application/wasm'); $Arr['wav']=array('audio/x-wav'); $Arr['wax']=array('audio/x-ms-wax'); $Arr['wbmp']=array('image/vnd.wap.wbmp'); $Arr['wbs']=array('application/vnd.criticaltools.wbs+xml'); $Arr['wbxml']=array('application/vnd.wap.wbxml'); $Arr['wcm']=array('application/vnd.ms-works'); $Arr['wdb']=array('application/vnd.ms-works'); $Arr['wdp']=array('image/vnd.ms-photo'); $Arr['weba']=array('audio/webm'); $Arr['webm']=array('video/webm'); $Arr['webp']=array('image/webp'); $Arr['wg']=array('application/vnd.pmi.widget'); $Arr['wgt']=array('application/widget'); $Arr['wks']=array('application/vnd.ms-works'); $Arr['wm']=array('video/x-ms-wm'); $Arr['wma']=array('audio/x-ms-wma'); $Arr['wmd']=array('application/x-ms-wmd'); $Arr['wmf']=array('application/x-msmetafile'); $Arr['wml']=array('text/vnd.wap.wml'); $Arr['wmlc']=array('application/vnd.wap.wmlc'); $Arr['wmls']=array('text/vnd.wap.wmlscript'); $Arr['wmlsc']=array('application/vnd.wap.wmlscriptc'); $Arr['wmv']=array('video/x-ms-wmv'); $Arr['wmx']=array('video/x-ms-wmx'); $Arr['wmz']=array('application/x-ms-wmz','application/x-msmetafile'); $Arr['woff']=array('font/woff'); $Arr['woff2']=array('font/woff2'); $Arr['wpd']=array('application/vnd.wordperfect'); $Arr['wpl']=array('application/vnd.ms-wpl'); $Arr['wps']=array('application/vnd.ms-works'); $Arr['wqd']=array('application/vnd.wqd'); $Arr['wri']=array('application/x-mswrite'); $Arr['wrl']=array('model/vrml'); $Arr['wsdl']=array('application/wsdl+xml'); $Arr['wspolicy']=array('application/wspolicy+xml'); $Arr['wtb']=array('application/vnd.webturbo'); $Arr['wvx']=array('video/x-ms-wvx'); $Arr['x32']=array('application/x-authorware-bin'); $Arr['x3d']=array('model/x3d+xml'); $Arr['x3db']=array('model/x3d+binary'); $Arr['x3dbz']=array('model/x3d+binary'); $Arr['x3dv']=array('model/x3d+vrml'); $Arr['x3dvz']=array('model/x3d+vrml'); $Arr['x3dz']=array('model/x3d+xml'); $Arr['xaml']=array('application/xaml+xml'); $Arr['xap']=array('application/x-silverlight-app'); $Arr['xar']=array('application/vnd.xara'); $Arr['xbap']=array('application/x-ms-xbap'); $Arr['xbd']=array('application/vnd.fujixerox.docuworks.binder'); $Arr['xbm']=array('image/x-xbitmap'); $Arr['xdf']=array('application/xcap-diff+xml'); $Arr['xdm']=array('application/vnd.syncml.dm+xml'); $Arr['xdp']=array('application/vnd.adobe.xdp+xml'); $Arr['xdssc']=array('application/dssc+xml'); $Arr['xdw']=array('application/vnd.fujixerox.docuworks'); $Arr['xenc']=array('application/xenc+xml'); $Arr['xer']=array('application/patch-ops-error+xml'); $Arr['xfdf']=array('application/vnd.adobe.xfdf'); $Arr['xfdl']=array('application/vnd.xfdl'); $Arr['xht']=array('application/xhtml+xml'); $Arr['xhtml']=array('application/xhtml+xml'); $Arr['xhvml']=array('application/xv+xml'); $Arr['xif']=array('image/vnd.xiff'); $Arr['xla']=array('application/vnd.ms-excel'); $Arr['xlam']=array('application/vnd.ms-excel.addin.macroenabled.12'); $Arr['xlc']=array('application/vnd.ms-excel'); $Arr['xlf']=array('application/x-xliff+xml'); $Arr['xlm']=array('application/vnd.ms-excel'); $Arr['xls']=array('application/vnd.ms-excel'); $Arr['xlsb']=array('application/vnd.ms-excel.sheet.binary.macroenabled.12'); $Arr['xlsm']=array('application/vnd.ms-excel.sheet.macroenabled.12'); $Arr['xlsx']=array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); $Arr['xlt']=array('application/vnd.ms-excel'); $Arr['xltm']=array('application/vnd.ms-excel.template.macroenabled.12'); $Arr['xltx']=array('application/vnd.openxmlformats-officedocument.spreadsheetml.template'); $Arr['xlw']=array('application/vnd.ms-excel'); $Arr['xm']=array('audio/xm'); $Arr['xml']=array('application/xml'); $Arr['xo']=array('application/vnd.olpc-sugar'); $Arr['xop']=array('application/xop+xml'); $Arr['xpi']=array('application/x-xpinstall'); $Arr['xpl']=array('application/xproc+xml'); $Arr['xpm']=array('image/x-xpixmap'); $Arr['xpr']=array('application/vnd.is-xpr'); $Arr['xps']=array('application/vnd.ms-xpsdocument'); $Arr['xpw']=array('application/vnd.intercon.formnet'); $Arr['xpx']=array('application/vnd.intercon.formnet'); $Arr['xsl']=array('application/xml'); $Arr['xslt']=array('application/xslt+xml'); $Arr['xsm']=array('application/vnd.syncml+xml'); $Arr['xspf']=array('application/xspf+xml'); $Arr['xul']=array('application/vnd.mozilla.xul+xml'); $Arr['xvm']=array('application/xv+xml'); $Arr['xvml']=array('application/xv+xml'); $Arr['xwd']=array('image/x-xwindowdump'); $Arr['xyz']=array('chemical/x-xyz'); $Arr['xz']=array('application/x-xz'); $Arr['yang']=array('application/yang'); $Arr['yin']=array('application/yin+xml'); $Arr['z1']=array('application/x-zmachine'); $Arr['z2']=array('application/x-zmachine'); $Arr['z3']=array('application/x-zmachine'); $Arr['z4']=array('application/x-zmachine'); $Arr['z5']=array('application/x-zmachine'); $Arr['z6']=array('application/x-zmachine'); $Arr['z7']=array('application/x-zmachine'); $Arr['z8']=array('application/x-zmachine'); $Arr['zaz']=array('application/vnd.zzazz.deck+xml'); $Arr['zip']=array('application/zip'); $Arr['zir']=array('application/vnd.zul'); $Arr['zirz']=array('application/vnd.zul'); $Arr['zmm']=array('application/vnd.handheld-entertainment+xml'); $_GET['ext']=trim($_GET['ext']); if(empty($_GET['ext'])) { echo 'Usage:<pre style="font-size:2em;">...?ext=EXTENSION</pre>'; } else { if( isset($Arr[$_GET['ext']]) ) { echo 'MIME' . (count($Arr[$_GET['ext']])>1?'s':'') . " for extension <b>{$_GET['ext']}</b>:\n"; echo '<pre style="font-size:2em;">' . implode("\n",$Arr[$_GET['ext']]) . '</pre>'; } else { echo "Extension \"{$_GET['ext']}\" is unknown."; } } ?>
No customization is required. You can be using the script in a few steps.
-
Copy the source code.
-
Save it as
MIMEget.php
or other*.php
file name. -
Upload
MIMEget.php
to your server, making a note of its URL. -
Type
MIMEget.php
's URL into your browser's address bar.
The File Extension MIME Lookup PHP script is a quick lookup, certainly faster than trying to determine a MIME type with a fresh search on the internet.
(This content first appeared in Possibilities newsletter.)
Will Bontrager