Mime Type dosyanın türünü tanımlamamıza yarar. En sık mail ve web tasarcılarında kullanılır. Bunun PHP ile ne alakası var diyeceksiniz. Örneğin RSS için PHP ile bir xml dosyası çıkarmalısınız ama sayfanın sonu .php olarak bitiyor haliyle xml gibi gözükmüyor bunu Mime Type tanımlayarak düzeltebilirsiniz.
Aşağıda PHP ile en çok kullanılan mime typelar yer almaktadır;
Atom
header('Content-type: application/atom+xml);
CSS
header('Content-type: text/css');
Javascript
header('Content-type: text/javascript');
JPEG Image
header('Content-type: image/jpeg');
JSON
header('Content-type: application/json');
PDF
header('Content-type: application/pdf');
RSS
header('Content-Type: application/rss+xml; charset=ISO-8859-1');
Text (Plain)
header('Content-type: text/plain');
XML
header('Content-type: text/xml');
Diğer Türler;
MIME Type | File Extension |
---|---|
application/SLA | stl |
application/STEP | step |
application/STEP | stp |
application/acad | dwg |
application/andrew-inset | ez |
application/clariscad | ccad |
application/drafting | drw |
application/dsptype | tsp |
application/dxf | dxf |
application/excel | xls |
application/i-deas | unv |
application/java-archive | jar |
application/mac-binhex40 | hqx |
application/mac-compactpro | cpt |
application/vnd.ms-powerpoint | pot |
application/vnd.ms-powerpoint | pps |
application/vnd.ms-powerpoint | ppt |
application/vnd.ms-powerpoint | ppz |
application/msword | doc |
application/octet-stream | bin |
application/octet-stream | class |
application/octet-stream | dms |
application/octet-stream | exe |
application/octet-stream | lha |
application/octet-stream | lzh |
application/oda | oda |
application/ogg | ogg |
application/ogg | ogm |
application/pdf | |
application/pgp | pgp |
application/postscript | ai |
application/postscript | eps |
application/postscript | ps |
application/pro_eng | prt |
application/rtf | rtf |
application/set | set |
application/smil | smi |
application/smil | smil |
application/solids | sol |
application/vda | vda |
application/vnd.mif | mif |
application/vnd.ms-excel | xlc |
application/vnd.ms-excel | xll |
application/vnd.ms-excel | xlm |
application/vnd.ms-excel | xls |
application/vnd.ms-excel | xlw |
application/vnd.rim.cod | cod |
application/x-arj-compressed | arj |
application/x-bcpio | bcpio |
application/x-cdlink | vcd |
application/x-chess-pgn | pgn |
application/x-cpio | cpio |
application/x-csh | csh |
application/x-debian-package | deb |
application/x-director | dcr |
application/x-director | dir |
application/x-director | dxr |
application/x-dvi | dvi |
application/x-freelance | pre |
application/x-futuresplash | spl |
application/x-gtar | gtar |
application/x-gunzip | gz |
application/x-gzip | gz |
application/x-hdf | hdf |
application/x-ipix | ipx |
application/x-ipscript | ips |
application/x-javascript | js |
application/x-koan | skd |
application/x-koan | skm |
application/x-koan | skp |
application/x-koan | skt |
application/x-latex | latex |
application/x-lisp | lsp |
application/x-lotusscreencam | scm |
application/x-mif | mif |
application/x-msdos-program | bat |
application/x-msdos-program | com |
application/x-msdos-program | exe |
application/x-netcdf | cdf |
application/x-netcdf | nc |
application/x-perl | pl |
application/x-perl | pm |
application/x-rar-compressed | rar |
application/x-sh | sh |
application/x-shar | shar |
application/x-shockwave-flash | swf |
application/x-stuffit | sit |
application/x-sv4cpio | sv4cpio |
application/x-sv4crc | sv4crc |
application/x-tar-gz | tar.gz |
application/x-tar-gz | tgz |
application/x-tar | tar |
application/x-tcl | tcl |
application/x-tex | tex |
application/x-texinfo | texi |
application/x-texinfo | texinfo |
application/x-troff-man | man |
application/x-troff-me | me |
application/x-troff-ms | ms |
application/x-troff | roff |
application/x-troff | t |
application/x-troff | tr |
application/x-ustar | ustar |
application/x-wais-source | src |
application/x-zip-compressed | zip |
application/zip | zip |
audio/TSP-audio | tsi |
audio/basic | au |
audio/basic | snd |
audio/midi | kar |
audio/midi | mid |
audio/midi | midi |
audio/mpeg | mp2 |
audio/mpeg | mp3 |
audio/mpeg | mpga |
audio/ulaw | au |
audio/x-aiff | aif |
audio/x-aiff | aifc |
audio/x-aiff | aiff |
audio/x-mpegurl | m3u |
audio/x-ms-wax | wax |
audio/x-ms-wma | wma |
audio/x-pn-realaudio-plugin | rpm |
audio/x-pn-realaudio | ram |
audio/x-pn-realaudio | rm |
audio/x-realaudio | ra |
audio/x-wav | wav |
chemical/x-pdb | pdb |
chemical/x-pdb | xyz |
image/cmu-raster | ras |
image/gif | gif |
image/ief | ief |
image/jpeg | jpe |
image/jpeg | jpeg |
image/jpeg | jpg |
image/png | png |
image/tiff | tif tiff |
image/tiff | tif |
image/tiff | tiff |
image/x-cmu-raster | ras |
image/x-portable-anymap | pnm |
image/x-portable-bitmap | pbm |
image/x-portable-graymap | pgm |
image/x-portable-pixmap | ppm |
image/x-rgb | rgb |
image/x-xbitmap | xbm |
image/x-xpixmap | xpm |
image/x-xwindowdump | xwd |
model/iges | iges |
model/iges | igs |
model/mesh | mesh |
model/mesh | msh |
model/mesh | silo |
model/vrml | vrml |
model/vrml | wrl |
text/css | css |
text/html | htm |
text/html | html htm |
text/html | html |
text/plain | asc txt |
text/plain | asc |
text/plain | c |
text/plain | cc |
text/plain | f90 |
text/plain | f |
text/plain | h |
text/plain | hh |
text/plain | m |
text/plain | txt |
text/richtext | rtx |
text/rtf | rtf |
text/sgml | sgm |
text/sgml | sgml |
text/tab-separated-values | tsv |
text/vnd.sun.j2me.app-descriptor | jad |
text/x-setext | etx |
text/xml | xml |
video/dl | dl |
video/fli | fli |
video/flv | flv |
video/gl | gl |
video/mpeg | mp2 |
video/mp4 | mp4 |
video/mpeg | mpe |
video/mpeg | mpeg |
video/mpeg | mpg |
video/quicktime | mov |
video/quicktime | qt |
video/vnd.vivo | viv |
video/vnd.vivo | vivo |
video/x-fli | fli |
video/x-ms-asf | asf |
video/x-ms-asx | asx |
video/x-ms-wmv | wmv |
video/x-ms-wmx | wmx |
video/x-ms-wvx | wvx |
video/x-msvideo | avi |
video/x-sgi-movie | movie |
www/mime | mime |
x-conference/x-cooltalk | ice |
x-world/x-vrml | vrm |
x-world/x-vrml | vrml |
Tek Yorum
wayy masallahh.. super bir kaynak olmus.. tskler