1<?php 2/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ 3 4/** 5 * Retrieve the MIME of a file thanks to its extension 6 * 7 * PHP versions 4 and 5 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; either 12 * version 2.1 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the Free Software 21 * Foundation, Inc., 59 Temple Place, Suite 330,Boston,MA 02111-1307 USA 22 * 23 * @category File Formats 24 * @package File_Archive 25 * @author Vincent Lascaux <vincentlascaux@php.net> 26 * @copyright 1997-2005 The PHP Group 27 * @license http://www.gnu.org/copyleft/lesser.html LGPL 28 * @version CVS: $Id: MimeList.php,v 1.7 2005/02/23 20:11:42 vincentlascaux Exp $ 29 * @link http://pear.php.net/package/File_Archive 30 */ 31 32/** 33 * Returns the MIME of the filename, deducted from its extension 34 * If the extension is unknown, returns "application/octet-stream" 35 */ 36function File_Archive_Reader_GetMime($filename) 37{ 38 $pos = strrpos($filename, '.'); 39 $extension = ""; 40 if ($pos !== false) { 41 $extension = strtolower(substr($filename, $pos+1)); 42 } 43 44 switch($extension) { 45 case '3dmf': 46 return 'x-world/x-3dmf'; 47 case 'a': 48 return 'application/octet-stream'; 49 case 'aab': 50 return 'application/x-authorware-bin'; 51 case 'aam': 52 return 'application/x-authorware-map'; 53 case 'aas': 54 return 'application/x-authorware-seg'; 55 case 'abc': 56 return 'text/vnd.abc'; 57 case 'acgi': 58 return 'text/html'; 59 case 'afl': 60 return 'video/animaflex'; 61 case 'ai': 62 return 'application/postscript'; 63 case 'aif': 64 return 'audio/aiff'; 65 case 'aifc': 66 return 'audio/aiff'; 67 case 'aiff': 68 return 'audio/aiff'; 69 case 'aim': 70 return 'application/x-aim'; 71 case 'aip': 72 return 'text/x-audiosoft-intra'; 73 case 'ani': 74 return 'application/x-navi-animation'; 75 case 'aos': 76 return 'application/x-nokia-9000-communicator-add-on-software'; 77 case 'aps': 78 return 'application/mime'; 79 case 'arc': 80 return 'application/octet-stream'; 81 case 'arj': 82 return 'application/arj'; 83 case 'art': 84 return 'image/x-jg'; 85 case 'asf': 86 return 'video/x-ms-asf'; 87 case 'asm': 88 return 'text/x-asm'; 89 case 'asp': 90 return 'text/asp'; 91 case 'asx': 92 return 'application/x-mplayer2'; 93 case 'au': 94 return 'audio/basic'; 95 case 'avi': 96 return 'application/x-troff-msvideo'; 97 case 'avs': 98 return 'video/avs-video'; 99 case 'bcpio': 100 return 'application/x-bcpio'; 101 case 'bin': 102 return 'application/x-binary'; 103 case 'bm': 104 return 'image/bmp'; 105 case 'bmp': 106 return 'image/bmp'; 107 case 'boo': 108 return 'application/book'; 109 case 'book': 110 return 'application/book'; 111 case 'boz': 112 return 'application/x-bzip2'; 113 case 'bsh': 114 return 'application/x-bsh'; 115 case 'bz': 116 return 'application/x-bzip'; 117 case 'bz2': 118 return 'application/x-bzip2'; 119 case 'c': 120 return 'text/plain'; 121 case 'c++': 122 return 'text/plain'; 123 case 'cat': 124 return 'application/vnd.ms-pki.seccat'; 125 case 'cc': 126 return 'text/plain'; 127 case 'ccad': 128 return 'application/clariscad'; 129 case 'cco': 130 return 'application/x-cocoa'; 131 case 'cdf': 132 return 'application/cdf'; 133 case 'cer': 134 return 'application/pkix-cert'; 135 case 'cha': 136 return 'application/x-chat'; 137 case 'chat': 138 return 'application/x-chat'; 139 case 'class': 140 return 'application/java'; 141 case 'com': 142 return 'application/octet-stream'; 143 case 'conf': 144 return 'text/plain'; 145 case 'cpio': 146 return 'application/x-cpio'; 147 case 'cpp': 148 return 'text/x-c'; 149 case 'cpt': 150 return 'application/mac-compactpro'; 151 case 'crl': 152 return 'application/pkcs-crl'; 153 case 'csh': 154 return 'application/x-csh'; 155 case 'css': 156 return 'text/css'; 157 case 'cxx': 158 return 'text/plain'; 159 case 'dcr': 160 return 'application/x-director'; 161 case 'deepv': 162 return 'application/x-deepv'; 163 case 'def': 164 return 'text/plain'; 165 case 'der': 166 return 'application/x-x509-ca-cert'; 167 case 'dif': 168 return 'video/x-dv'; 169 case 'dir': 170 return 'application/x-director'; 171 case 'dl': 172 return 'video/dl'; 173 case 'doc': 174 return 'application/msword'; 175 case 'dot': 176 return 'application/msword'; 177 case 'dp': 178 return 'application/commonground'; 179 case 'drw': 180 return 'application/drafting'; 181 case 'dump': 182 return 'application/octet-stream'; 183 case 'dv': 184 return 'video/x-dv'; 185 case 'dvi': 186 return 'application/x-dvi'; 187 case 'dwf': 188 return 'drawing/x-dwf (old)'; 189 case 'dwg': 190 return 'application/acad'; 191 case 'dxf': 192 return 'application/dxf'; 193 case 'dxr': 194 return 'application/x-director'; 195 case 'el': 196 return 'text/x-script.elisp'; 197 case 'elc': 198 return 'application/x-bytecode.elisp (compiled elisp)'; 199 case 'env': 200 return 'application/x-envoy'; 201 case 'eps': 202 return 'application/postscript'; 203 case 'es': 204 return 'application/x-esrehber'; 205 case 'etx': 206 return 'text/x-setext'; 207 case 'evy': 208 return 'application/envoy'; 209 case 'exe': 210 return 'application/octet-stream'; 211 case 'f': 212 return 'text/plain'; 213 case 'f77': 214 return 'text/x-fortran'; 215 case 'f90': 216 return 'text/plain'; 217 case 'fdf': 218 return 'application/vnd.fdf'; 219 case 'fif': 220 return 'application/fractals'; 221 case 'fli': 222 return 'video/fli'; 223 case 'flo': 224 return 'image/florian'; 225 case 'flx': 226 return 'text/vnd.fmi.flexstor'; 227 case 'fmf': 228 return 'video/x-atomic3d-feature'; 229 case 'for': 230 return 'text/plain'; 231 case 'fpx': 232 return 'image/vnd.fpx'; 233 case 'frl': 234 return 'application/freeloader'; 235 case 'funk': 236 return 'audio/make'; 237 case 'g': 238 return 'text/plain'; 239 case 'g3': 240 return 'image/g3fax'; 241 case 'gif': 242 return 'image/gif'; 243 case 'gl': 244 return 'video/gl'; 245 case 'gsd': 246 return 'audio/x-gsm'; 247 case 'gsm': 248 return 'audio/x-gsm'; 249 case 'gsp': 250 return 'application/x-gsp'; 251 case 'gss': 252 return 'application/x-gss'; 253 case 'gtar': 254 return 'application/x-gtar'; 255 case 'gz': 256 return 'application/x-compressed'; 257 case 'gzip': 258 return 'application/x-gzip'; 259 case 'h': 260 return 'text/plain'; 261 case 'hdf': 262 return 'application/x-hdf'; 263 case 'help': 264 return 'application/x-helpfile'; 265 case 'hgl': 266 return 'application/vnd.hp-hpgl'; 267 case 'hh': 268 return 'text/plain'; 269 case 'hlb': 270 return 'text/x-script'; 271 case 'hlp': 272 return 'application/hlp'; 273 case 'hpg': 274 return 'application/vnd.hp-hpgl'; 275 case 'hpgl': 276 return 'application/vnd.hp-hpgl'; 277 case 'hqx': 278 return 'application/binhex'; 279 case 'hta': 280 return 'application/hta'; 281 case 'htc': 282 return 'text/x-component'; 283 case 'htm': 284 return 'text/html'; 285 case 'html': 286 return 'text/html'; 287 case 'htmls': 288 return 'text/html'; 289 case 'htt': 290 return 'text/webviewhtml'; 291 case 'htx': 292 return 'text/html'; 293 case 'ice': 294 return 'x-conference/x-cooltalk'; 295 case 'ico': 296 return 'image/x-icon'; 297 case 'idc': 298 return 'text/plain'; 299 case 'ief': 300 return 'image/ief'; 301 case 'iefs': 302 return 'image/ief'; 303 case 'iges': 304 return 'application/iges'; 305 case 'igs': 306 return 'application/iges'; 307 case 'ima': 308 return 'application/x-ima'; 309 case 'imap': 310 return 'application/x-httpd-imap'; 311 case 'inf': 312 return 'application/inf'; 313 case 'ins': 314 return 'application/x-internett-signup'; 315 case 'ip': 316 return 'application/x-ip2'; 317 case 'isu': 318 return 'video/x-isvideo'; 319 case 'it': 320 return 'audio/it'; 321 case 'iv': 322 return 'application/x-inventor'; 323 case 'ivr': 324 return 'i-world/i-vrml'; 325 case 'ivy': 326 return 'application/x-livescreen'; 327 case 'jam': 328 return 'audio/x-jam'; 329 case 'jav': 330 return 'text/plain'; 331 case 'java': 332 return 'text/plain'; 333 case 'jcm': 334 return 'application/x-java-commerce'; 335 case 'jfif': 336 return 'image/jpeg'; 337 case 'jfif-tbnl': 338 return 'image/jpeg'; 339 case 'jpe': 340 return 'image/jpeg'; 341 case 'jpeg': 342 return 'image/jpeg'; 343 case 'jpg': 344 return 'image/jpeg'; 345 case 'jps': 346 return 'image/x-jps'; 347 case 'js': 348 return 'application/x-javascript'; 349 case 'jut': 350 return 'image/jutvision'; 351 case 'kar': 352 return 'audio/midi'; 353 case 'ksh': 354 return 'application/x-ksh'; 355 case 'la': 356 return 'audio/nspaudio'; 357 case 'lam': 358 return 'audio/x-liveaudio'; 359 case 'latex': 360 return 'application/x-latex'; 361 case 'lha': 362 return 'application/lha'; 363 case 'lhx': 364 return 'application/octet-stream'; 365 case 'list': 366 return 'text/plain'; 367 case 'lma': 368 return 'audio/nspaudio'; 369 case 'log': 370 return 'text/plain'; 371 case 'lsp': 372 return 'application/x-lisp'; 373 case 'lst': 374 return 'text/plain'; 375 case 'lsx': 376 return 'text/x-la-asf'; 377 case 'ltx': 378 return 'application/x-latex'; 379 case 'lzh': 380 return 'application/octet-stream'; 381 case 'lzx': 382 return 'application/lzx'; 383 case 'm': 384 return 'text/plain'; 385 case 'm1v': 386 return 'video/mpeg'; 387 case 'm2a': 388 return 'audio/mpeg'; 389 case 'm2v': 390 return 'video/mpeg'; 391 case 'm3u': 392 return 'audio/x-mpequrl'; 393 case 'man': 394 return 'application/x-troff-man'; 395 case 'map': 396 return 'application/x-navimap'; 397 case 'mar': 398 return 'text/plain'; 399 case 'mbd': 400 return 'application/mbedlet'; 401 case 'mc$': 402 return 'application/x-magic-cap-package-1.0'; 403 case 'mcd': 404 return 'application/mcad'; 405 case 'mcf': 406 return 'image/vasa'; 407 case 'mcp': 408 return 'application/netmc'; 409 case 'me': 410 return 'application/x-troff-me'; 411 case 'mht': 412 return 'message/rfc822'; 413 case 'mhtml': 414 return 'message/rfc822'; 415 case 'mid': 416 return 'application/x-midi'; 417 case 'midi': 418 return 'audio/midi'; 419 case 'mif': 420 return 'application/x-frame'; 421 case 'mime': 422 return 'message/rfc822'; 423 case 'mjf': 424 return 'audio/x-vnd.audioexplosion.mjuicemediafile'; 425 case 'mjpg': 426 return 'video/x-motion-jpeg'; 427 case 'mm': 428 return 'application/base64'; 429 case 'mme': 430 return 'application/base64'; 431 case 'mod': 432 return 'audio/mod'; 433 case 'moov': 434 return 'video/quicktime'; 435 case 'mov': 436 return 'video/quicktime'; 437 case 'movie': 438 return 'video/x-sgi-movie'; 439 case 'mp2': 440 return 'video/mpeg'; 441 case 'mp3': 442 return 'video/mpeg'; 443 case 'mpa': 444 return 'audio/mpeg'; 445 case 'mpc': 446 return 'application/x-project'; 447 case 'mpe': 448 return 'video/mpeg'; 449 case 'mpeg': 450 return 'video/mpeg'; 451 case 'mpg': 452 return 'video/mpeg'; 453 case 'mpga': 454 return 'audio/mpeg'; 455 case 'mpp': 456 return 'application/vnd.ms-project'; 457 case 'mpt': 458 return 'application/x-project'; 459 case 'mpv': 460 return 'application/x-project'; 461 case 'mpx': 462 return 'application/x-project'; 463 case 'mrc': 464 return 'application/marc'; 465 case 'ms': 466 return 'application/x-troff-ms'; 467 case 'mv': 468 return 'video/x-sgi-movie'; 469 case 'my': 470 return 'audio/make'; 471 case 'mzz': 472 return 'application/x-vnd.audioexplosion.mzz'; 473 case 'nap': 474 return 'image/naplps'; 475 case 'naplps': 476 return 'image/naplps'; 477 case 'nc': 478 return 'application/x-netcdf'; 479 case 'ncm': 480 return 'application/vnd.nokia.configuration-message'; 481 case 'nif': 482 return 'image/x-niff'; 483 case 'niff': 484 return 'image/x-niff'; 485 case 'nix': 486 return 'application/x-mix-transfer'; 487 case 'nsc': 488 return 'application/x-conference'; 489 case 'nvd': 490 return 'application/x-navidoc'; 491 case 'o': 492 return 'application/octet-stream'; 493 case 'oda': 494 return 'application/oda'; 495 case 'omc': 496 return 'application/x-omc'; 497 case 'omcd': 498 return 'application/x-omcdatamaker'; 499 case 'omcr': 500 return 'application/x-omcregerator'; 501 case 'p': 502 return 'text/x-pascal'; 503 case 'p10': 504 return 'application/pkcs10'; 505 case 'p12': 506 return 'application/pkcs-12'; 507 case 'p7a': 508 return 'application/x-pkcs7-signature'; 509 case 'p7c': 510 return 'application/pkcs7-mime'; 511 case 'p7m': 512 return 'application/pkcs7-mime'; 513 case 'p7r': 514 return 'application/x-pkcs7-certreqresp'; 515 case 'p7s': 516 return 'application/pkcs7-signature'; 517 case 'part': 518 return 'application/pro_eng'; 519 case 'pas': 520 return 'text/pascal'; 521 case 'pbm': 522 return 'image/x-portable-bitmap'; 523 case 'pcl': 524 return 'application/vnd.hp-pcl'; 525 case 'pct': 526 return 'image/x-pict'; 527 case 'pcx': 528 return 'image/x-pcx'; 529 case 'pdb': 530 return 'chemical/x-pdb'; 531 case 'pdf': 532 return 'application/pdf'; 533 case 'pfunk': 534 return 'audio/make'; 535 case 'pgm': 536 return 'image/x-portable-graymap'; 537 case 'pic': 538 return 'image/pict'; 539 case 'pict': 540 return 'image/pict'; 541 case 'pkg': 542 return 'application/x-newton-compatible-pkg'; 543 case 'pko': 544 return 'application/vnd.ms-pki.pko'; 545 case 'pl': 546 return 'text/plain'; 547 case 'plx': 548 return 'application/x-pixclscript'; 549 case 'pm': 550 return 'image/x-xpixmap'; 551 case 'pm4': 552 return 'application/x-pagemaker'; 553 case 'pm5': 554 return 'application/x-pagemaker'; 555 case 'png': 556 return 'image/png'; 557 case 'pnm': 558 return 'application/x-portable-anymap'; 559 case 'pot': 560 return 'application/mspowerpoint'; 561 case 'pov': 562 return 'model/x-pov'; 563 case 'ppa': 564 return 'application/vnd.ms-powerpoint'; 565 case 'ppm': 566 return 'image/x-portable-pixmap'; 567 case 'pps': 568 return 'application/mspowerpoint'; 569 case 'ppt': 570 return 'application/mspowerpoint'; 571 case 'ppz': 572 return 'application/mspowerpoint'; 573 case 'pre': 574 return 'application/x-freelance'; 575 case 'prt': 576 return 'application/pro_eng'; 577 case 'ps': 578 return 'application/postscript'; 579 case 'psd': 580 return 'application/octet-stream'; 581 case 'pvu': 582 return 'paleovu/x-pv'; 583 case 'pwz': 584 return 'application/vnd.ms-powerpoint'; 585 case 'py': 586 return 'text/x-script.phyton'; 587 case 'pyc': 588 return 'applicaiton/x-bytecode.python'; 589 case 'qcp': 590 return 'audio/vnd.qcelp'; 591 case 'qd3': 592 return 'x-world/x-3dmf'; 593 case 'qd3d': 594 return 'x-world/x-3dmf'; 595 case 'qif': 596 return 'image/x-quicktime'; 597 case 'qt': 598 return 'video/quicktime'; 599 case 'qtc': 600 return 'video/x-qtc'; 601 case 'qti': 602 return 'image/x-quicktime'; 603 case 'qtif': 604 return 'image/x-quicktime'; 605 case 'ra': 606 return 'audio/x-pn-realaudio'; 607 case 'ram': 608 return 'audio/x-pn-realaudio'; 609 case 'ras': 610 return 'application/x-cmu-raster'; 611 case 'rast': 612 return 'image/cmu-raster'; 613 case 'rexx': 614 return 'text/x-script.rexx'; 615 case 'rf': 616 return 'image/vnd.rn-realflash'; 617 case 'rgb': 618 return 'image/x-rgb'; 619 case 'rm': 620 return 'application/vnd.rn-realmedia'; 621 case 'rmi': 622 return 'audio/mid'; 623 case 'rmm': 624 return 'audio/x-pn-realaudio'; 625 case 'rmp': 626 return 'audio/x-pn-realaudio'; 627 case 'rng': 628 return 'application/ringing-tones'; 629 case 'rnx': 630 return 'application/vnd.rn-realplayer'; 631 case 'roff': 632 return 'application/x-troff'; 633 case 'rp': 634 return 'image/vnd.rn-realpix'; 635 case 'rpm': 636 return 'audio/x-pn-realaudio-plugin'; 637 case 'rt': 638 return 'text/richtext'; 639 case 'rtf': 640 return 'application/rtf'; 641 case 'rtx': 642 return 'text/richtext'; 643 case 'rv': 644 return 'video/vnd.rn-realvideo'; 645 case 's': 646 return 'text/x-asm'; 647 case 's3m': 648 return 'audio/s3m'; 649 case 'saveme': 650 return 'application/octet-stream'; 651 case 'sbk': 652 return 'application/x-tbook'; 653 case 'scm': 654 return 'application/x-lotusscreencam'; 655 case 'sdml': 656 return 'text/plain'; 657 case 'sdp': 658 return 'application/sdp'; 659 case 'sdr': 660 return 'application/sounder'; 661 case 'sea': 662 return 'application/sea'; 663 case 'set': 664 return 'application/set'; 665 case 'sgm': 666 return 'text/sgml'; 667 case 'sgml': 668 return 'text/sgml'; 669 case 'sh': 670 return 'application/x-bsh'; 671 case 'shar': 672 return 'application/x-bsh'; 673 case 'shtml': 674 return 'text/html'; 675 case 'sid': 676 return 'audio/x-psid'; 677 case 'sit': 678 return 'application/x-sit'; 679 case 'skd': 680 return 'application/x-koan'; 681 case 'skm': 682 return 'application/x-koan'; 683 case 'skp': 684 return 'application/x-koan'; 685 case 'skt': 686 return 'application/x-koan'; 687 case 'sl': 688 return 'application/x-seelogo'; 689 case 'smi': 690 return 'application/smil'; 691 case 'smil': 692 return 'application/smil'; 693 case 'snd': 694 return 'audio/basic'; 695 case 'sol': 696 return 'application/solids'; 697 case 'spc': 698 return 'application/x-pkcs7-certificates'; 699 case 'spl': 700 return 'application/futuresplash'; 701 case 'spr': 702 return 'application/x-sprite'; 703 case 'sprite': 704 return 'application/x-sprite'; 705 case 'src': 706 return 'application/x-wais-source'; 707 case 'ssi': 708 return 'text/x-server-parsed-html'; 709 case 'ssm': 710 return 'application/streamingmedia'; 711 case 'sst': 712 return 'application/vnd.ms-pki.certstore'; 713 case 'step': 714 return 'application/step'; 715 case 'stl': 716 return 'application/sla'; 717 case 'stp': 718 return 'application/step'; 719 case 'sv4cpio': 720 return 'application/x-sv4cpio'; 721 case 'sv4crc': 722 return 'application/x-sv4crc'; 723 case 'svf': 724 return 'image/vnd.dwg'; 725 case 'svr': 726 return 'application/x-world'; 727 case 'swf': 728 return 'application/x-shockwave-flash'; 729 case 't': 730 return 'application/x-troff'; 731 case 'talk': 732 return 'text/x-speech'; 733 case 'tar': 734 return 'application/x-tar'; 735 case 'tbk': 736 return 'application/toolbook'; 737 case 'tcl': 738 return 'application/x-tcl'; 739 case 'tcsh': 740 return 'text/x-script.tcsh'; 741 case 'tex': 742 return 'application/x-tex'; 743 case 'texi': 744 return 'application/x-texinfo'; 745 case 'texinfo': 746 return 'application/x-texinfo'; 747 case 'text': 748 return 'text/plain'; 749 case 'tgz': 750 return 'application/x-compressed'; 751 case 'tif': 752 return 'image/tiff'; 753 case 'tiff': 754 return 'image/tiff'; 755 case 'tr': 756 return 'application/x-troff'; 757 case 'tsi': 758 return 'audio/tsp-audio'; 759 case 'tsp': 760 return 'application/dsptype'; 761 case 'tsv': 762 return 'text/tab-separated-values'; 763 case 'turbot': 764 return 'image/florian'; 765 case 'txt': 766 return 'text/plain'; 767 case 'uil': 768 return 'text/x-uil'; 769 case 'uni': 770 return 'text/uri-list'; 771 case 'unis': 772 return 'text/uri-list'; 773 case 'unv': 774 return 'application/i-deas'; 775 case 'uri': 776 return 'text/uri-list'; 777 case 'uris': 778 return 'text/uri-list'; 779 case 'ustar': 780 return 'multipart/x-ustar'; 781 case 'uu': 782 return 'application/octet-stream'; 783 case 'uue': 784 return 'text/x-uuencode'; 785 case 'vcd': 786 return 'application/x-cdlink'; 787 case 'vcs': 788 return 'text/x-vcalendar'; 789 case 'vda': 790 return 'application/vda'; 791 case 'vdo': 792 return 'video/vdo'; 793 case 'vew': 794 return 'application/groupwise'; 795 case 'viv': 796 return 'video/vivo'; 797 case 'vivo': 798 return 'video/vivo'; 799 case 'vmd': 800 return 'application/vocaltec-media-desc'; 801 case 'vmf': 802 return 'application/vocaltec-media-file'; 803 case 'voc': 804 return 'audio/voc'; 805 case 'vos': 806 return 'video/vosaic'; 807 case 'vox': 808 return 'audio/voxware'; 809 case 'vqe': 810 return 'audio/x-twinvq-plugin'; 811 case 'vqf': 812 return 'audio/x-twinvq'; 813 case 'vql': 814 return 'audio/x-twinvq-plugin'; 815 case 'vrml': 816 return 'application/x-vrml'; 817 case 'vrt': 818 return 'x-world/x-vrt'; 819 case 'vsd': 820 return 'application/x-visio'; 821 case 'vst': 822 return 'application/x-visio'; 823 case 'vsw': 824 return 'application/x-visio'; 825 case 'w60': 826 return 'application/wordperfect6.0'; 827 case 'w61': 828 return 'application/wordperfect6.1'; 829 case 'w6w': 830 return 'application/msword'; 831 case 'wav': 832 return 'audio/wav'; 833 case 'wb1': 834 return 'application/x-qpro'; 835 case 'wbmp': 836 return 'image/vnd.wap.wbmp'; 837 case 'web': 838 return 'application/vnd.xara'; 839 case 'wiz': 840 return 'application/msword'; 841 case 'wk1': 842 return 'application/x-123'; 843 case 'wmf': 844 return 'windows/metafile'; 845 case 'wml': 846 return 'text/vnd.wap.wml'; 847 case 'wmlc': 848 return 'application/vnd.wap.wmlc'; 849 case 'wmls': 850 return 'text/vnd.wap.wmlscript'; 851 case 'wmlsc': 852 return 'application/vnd.wap.wmlscriptc'; 853 case 'word': 854 return 'application/msword'; 855 case 'wp': 856 return 'application/wordperfect'; 857 case 'wp5': 858 return 'application/wordperfect6.0'; 859 case 'wp6': 860 return 'application/wordperfect'; 861 case 'wpd': 862 return 'application/x-wpwin'; 863 case 'wq1': 864 return 'application/x-lotus'; 865 case 'wri': 866 return 'application/mswrite'; 867 case 'wrl': 868 return 'model/vrml'; 869 case 'wrz': 870 return 'model/vrml'; 871 case 'wsc': 872 return 'text/scriplet'; 873 case 'wsrc': 874 return 'application/x-wais-source'; 875 case 'wtk': 876 return 'application/x-wintalk'; 877 case 'xbm': 878 return 'image/x-xbitmap'; 879 case 'xdr': 880 return 'video/x-amt-demorun'; 881 case 'xgz': 882 return 'xgl/drawing'; 883 case 'xif': 884 return 'image/vnd.xiff'; 885 case 'xl': 886 return 'application/excel'; 887 case 'xla': 888 return 'application/excel'; 889 case 'xlb': 890 return 'application/excel'; 891 case 'xlc': 892 return 'application/excel'; 893 case 'xld': 894 return 'application/excel'; 895 case 'xlk': 896 return 'application/excel'; 897 case 'xll': 898 return 'application/excel'; 899 case 'xlm': 900 return 'application/excel'; 901 case 'xls': 902 return 'application/excel'; 903 case 'xlt': 904 return 'application/excel'; 905 case 'xlv': 906 return 'application/excel'; 907 case 'xlw': 908 return 'application/excel'; 909 case 'xm': 910 return 'audio/xm'; 911 case 'xml': 912 return 'application/xml'; 913 case 'xmz': 914 return 'xgl/movie'; 915 case 'xpix': 916 return 'application/x-vnd.ls-xpix'; 917 case 'xpm': 918 return 'image/xpm'; 919 case 'x-png': 920 return 'image/png'; 921 case 'xsr': 922 return 'video/x-amt-showrun'; 923 case 'xwd': 924 return 'image/x-xwd'; 925 case 'xyz': 926 return 'chemical/x-pdb'; 927 case 'z': 928 return 'application/x-compress'; 929 case 'zip': 930 return 'application/x-compressed'; 931 case 'zoo': 932 return 'application/octet-stream'; 933 case 'zsh': 934 return 'text/x-script.zsh'; 935 default: 936 return 'application/octet-stream'; 937 } 938} 939?>