[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/inc/ -> class.mime_magic.inc.php (source)

   1  <?php
   2    /********************************************************************\
   3    * eGroupWare - eGroupWare API - mime magic                           *
   4    * http://www.egroupware.org                                          *
   5    * This program is part of the GNU project, see http://www.gnu.org    *
   6    *                                                                    *
   7    * Originally taken from the Horde Framework http://horde.org         *
   8    *                                                                    *
   9    * Copyright 1999-2003 Anil Madhavapeddy <anil@recoil.org>            *
  10    * Copyright 2002-2003 Michael Slusarz <slusarz@bigworm.colorado.edu> *
  11    * Copyright 2003 Free Software Foundation, Inc.                      *
  12    *                                                                    *
  13    * Ported to phpGroupWare by Dave Hall - dave.hall@mbox.com.au        *
  14    * Note: this class was relicensed as GPL by Dave Hall - all mods GPL *
  15    * --------------------------------------------                       *
  16    *  This program is Free Software; you can redistribute it and/or     *
  17    *  modify it under the terms of the GNU General Public License as    *
  18    *  published by the Free Software Foundation; either version 2 of    *
  19    *  the License, or (at your option) any later version.               *
  20    \********************************************************************/
  21  
  22    /* $Id: class.mime_magic.inc.php 20295 2006-02-15 12:31:25Z  $ */
  23  
  24      class mime_magic
  25      {
  26          //extension to mime type map
  27          var $mime_extension_map;
  28  
  29          //map of file contents to mime type
  30          var $mime_magic_file;
  31  
  32          /**
  33          * Wrapper to PHP5 Compatible Constructor
  34          *
  35          * @author skwashd
  36  
  37          function mime_magic()
  38          {
  39              $this->__constructor()
  40          }
  41          */
  42  
  43          /**
  44          * Constructor
  45          *
  46          * Load the map values into the instance arrays
  47          * @author skwashd
  48          */
  49  		function mime_magic() //__constructor()
  50          {
  51              $this->mime_extension_map = $this->get_mime_ext_map();
  52              $this->mime_magic_file = $this->get_mime_magic_file();
  53          }
  54  
  55          /**
  56          * Attempt to convert a file extension to a MIME type
  57          *
  58          * This is the simplest MIME type guessing function - rough but fast.
  59          * If the MIME type is not found then 'application/octet-stream'
  60          * is returned.
  61          *
  62          * @access public
  63          *
  64          * @param string $ext  The file extension to be mapped to a MIME type.
  65          *
  66          * @return string  The MIME type of the file extension.
  67          */
  68  		function ext2mime($ext)
  69          {
  70              if (empty($ext))
  71              {
  72                  return 'text/plain';//assume no extension is a text file
  73              }
  74              else
  75              {
  76                  $ext = strtolower($ext);
  77                  if (!array_key_exists($ext, $this->mime_extension_map))
  78                  {
  79                      return 'application/octet-stream';
  80                  }
  81                  else
  82                  {
  83                      return $this->mime_extension_map[$ext];
  84                  }
  85              }
  86          }
  87  
  88          /**
  89          * Attempt to convert a filename to a MIME type, based on the
  90          * global and application specific config files.
  91          *
  92          * Unlike ext2mime, this function will return
  93          * 'application/octet-stream' for any unknown or empty extension
  94          *
  95          * @access public
  96          *
  97          * @param string $filename  The filename to be mapped to a MIME type.
  98          *
  99          * @return string  The MIME type of the filename.
 100          * @author skwashd - changed it to make it work with file.tar.gz etc
 101          */
 102  		function filename2mime($filename)
 103          {
 104              $fn_parts = explode('.', $filename);
 105              if (is_array($fn_parts))
 106              {
 107                  return $this->ext2mime($fn_parts[count($fn_parts)-1]);
 108              }
 109              return 'application/octet-stream';
 110          }
 111  
 112          /* temporary fix for apps using the old name */
 113  		function filename2mine($filename)
 114          {
 115              return $this->filename2mime($filename);
 116          }
 117  
 118          /**
 119          * Attempt to convert a MIME type to a file extension, based
 120          * on the global Horde and application specific config files.
 121          *
 122          * If we cannot map the type to a file extension, we return false.
 123          *
 124          * @access public
 125          *
 126          * @param string $type  The MIME type to be mapped to a file extension.
 127          *
 128          * @return string  The file extension of the MIME type.
 129          */
 130  		function mime2ext($type)
 131          {
 132              $key = array_search($type, $this->mime_extension_map);
 133              if (empty($type) || ($key === false))
 134              {
 135                  return false;
 136              }
 137              else
 138              {
 139                  return $key;
 140              }
 141          }
 142  
 143          /**
 144          * Uses variants of the UNIX "file" command to attempt to determine the
 145          * MIME type of an unknown file.
 146          *
 147          * @access public
 148          *
 149          * @param string $filename The filename (including full path) to the file to analyze.
 150          *
 151          * @return string  The MIME type of the file.  Returns false if either
 152          *                 the file type isn't recognized or the file command is
 153          *                 not available.
 154          */
 155  		function analyze_file($path)
 156          {
 157              /* If the PHP Mimetype extension is available, use that. */
 158              if (function_exists('mime_content_type'))
 159              {
 160                  return mime_content_type($path);
 161              }
 162              else
 163              {
 164                  /* Use a built-in magic file. */
 165                  if (!($fp = @fopen($path, 'rb')))
 166                  {
 167                      return false;
 168                  }
 169                  foreach ($this->mime_magic_file as $offset => $odata)
 170                  {
 171                      foreach ($odata as $length => $ldata)
 172                      {
 173                          @fseek($fp, $offset, SEEK_SET);
 174                          $lookup = @fread($fp, $length);
 175                          if (!empty($ldata[$lookup]))
 176                          {
 177                              fclose($fp);
 178                              return $ldata[$lookup];
 179                          }
 180                      }
 181                  }
 182                  fclose($fp);
 183              }
 184              return false;
 185          }
 186  
 187          /**
 188          * Instead of using an existing file a chunk of data is used for
 189          * testing.  Best to handle the file creation here, to make sure
 190          * it is secure and it is properly cleaned up.  Really just
 191          * a temp file creation and clean up method wrapper for analyze_file()
 192          *
 193          * @param string $data the data to analyze
 194          *
 195          * @param string MIME type false for none.
 196          *
 197          * @author skwashd
 198          */
 199  		function analyze_data($data)
 200          {
 201              if(!is_writeable(@$GLOBALS['egw_info']['server']['temp_dir']))
 202              {
 203                  //nothing we can do but bail out
 204                  return false;
 205              }
 206  
 207              mt_srand(time());
 208              $filename = $GLOBALS['egw_info']['server']['temp_dir'] . SEP
 209                  . md5( time() + mt_rand() ) . '.tmp';
 210  
 211              $fp = @fopen($filename, 'ab');
 212              if(!$fp || !$data)
 213              {
 214                  //houston we have a problem - bail out
 215                  return false;
 216              }
 217  
 218              if(!fwrite($fp, $data))
 219              {
 220                  //bail out again
 221                  return false;
 222              }
 223              fclose($fp);
 224              chmod($filename, 0600); //just to be cautious
 225  
 226              $mime = $this->analyze_file($filename);
 227  
 228              unlink($filename);//remove the temp file
 229  
 230              return $mime;
 231          }
 232  
 233          /**
 234          * Get an array containing a mapping of common file extensions to
 235          * MIME types.
 236          *
 237          * Original array taken from http://horde.org
 238          *
 239          * @author skwashd
 240          *
 241          * @return array of extenstion to mime mappings
 242          */
 243  		function get_mime_ext_map()
 244          {
 245              return array(
 246                  'ai'    => 'application/postscript',
 247                  'aif'    => 'audio/x-aiff',
 248                  'aifc'    => 'audio/x-aiff',
 249                  'aiff'    => 'audio/x-aiff',
 250                  'asc'    => 'application/pgp', //changed by skwashd - was text/plain
 251                  'asf'    => 'video/x-ms-asf',
 252                  'asx'    => 'video/x-ms-asf',
 253                  'au'    => 'audio/basic',
 254                  'avi'    => 'video/x-msvideo',
 255                  'bcpio'    => 'application/x-bcpio',
 256                  'bin'    => 'application/octet-stream',
 257                  'bmp'    => 'image/bmp',
 258                  'c'    => 'text/plain', // or 'text/x-csrc', //added by skwashd
 259                  'c++'    => 'text/plain', // or 'text/x-c++src', //added by skwashd
 260                  'cc'    => 'text/plain', // or 'text/x-c++src', //added by skwashd
 261                  'cs'    => 'text/plain', //added by skwashd - for C# src
 262                  'cpp'    => 'text/x-c++src', //added by skwashd
 263                  'cxx'    => 'text/x-c++src', //added by skwashd
 264                  'cdf'    => 'application/x-netcdf',
 265                  'class'    => 'application/octet-stream',//secure but application/java-class is correct
 266                  'com'    => 'application/octet-stream',//added by skwashd
 267                  'cpio'    => 'application/x-cpio',
 268                  'cpt'    => 'application/mac-compactpro',
 269                  'csh'    => 'application/x-csh',
 270                  'css'    => 'text/css',
 271                  'csv'    => 'text/comma-separated-values',//added by skwashd
 272                  'dcr'    => 'application/x-director',
 273                  'diff'    => 'text/diff',
 274                  'dir'    => 'application/x-director',
 275                  'dll'    => 'application/octet-stream',
 276                  'dms'    => 'application/octet-stream',
 277                  'doc'    => 'application/msword',
 278                  'dot'    => 'application/msword',//added by skwashd
 279                  'dvi'    => 'application/x-dvi',
 280                  'dxr'    => 'application/x-director',
 281                  'eps'    => 'application/postscript',
 282                  'etx'    => 'text/x-setext',
 283                  'exe'    => 'application/octet-stream',
 284                  'ez'    => 'application/andrew-inset',
 285                  'gif'    => 'image/gif',
 286                  'gtar'    => 'application/x-gtar',
 287                  'gz'    => 'application/x-gzip',
 288                  'h'    => 'text/plain', // or 'text/x-chdr',//added by skwashd
 289                  'h++'    => 'text/plain', // or 'text/x-c++hdr', //added by skwashd
 290                  'hh'    => 'text/plain', // or 'text/x-c++hdr', //added by skwashd
 291                  'hpp'    => 'text/plain', // or 'text/x-c++hdr', //added by skwashd
 292                  'hxx'    => 'text/plain', // or 'text/x-c++hdr', //added by skwashd
 293                  'hdf'    => 'application/x-hdf',
 294                  'hqx'    => 'application/mac-binhex40',
 295                  'htm'    => 'text/html',
 296                  'html'    => 'text/html',
 297                  'ice'    => 'x-conference/x-cooltalk',
 298                  'ics'    => 'text/calendar',
 299                  'ief'    => 'image/ief',
 300                  'ifb'    => 'text/calendar',
 301                  'iges'    => 'model/iges',
 302                  'igs'    => 'model/iges',
 303                  'jar'    => 'application/x-jar', //added by skwashd - alternative mime type
 304                  'java'    => 'text/x-java-source', //added by skwashd
 305                  'jpe'    => 'image/jpeg',
 306                  'jpeg'    => 'image/jpeg',
 307                  'jpg'    => 'image/jpeg',
 308                  'js'    => 'application/x-javascript',
 309                  'kar'    => 'audio/midi',
 310                  'latex'    => 'application/x-latex',
 311                  'lha'    => 'application/octet-stream',
 312                  'log'    => 'text/plain',
 313                  'lzh'    => 'application/octet-stream',
 314                  'm3u'    => 'audio/x-mpegurl',
 315                  'man'    => 'application/x-troff-man',
 316                  'me'    => 'application/x-troff-me',
 317                  'mesh'    => 'model/mesh',
 318                  'mid'    => 'audio/midi',
 319                  'midi'    => 'audio/midi',
 320                  'mif'    => 'application/vnd.mif',
 321                  'mov'    => 'video/quicktime',
 322                  'movie'    => 'video/x-sgi-movie',
 323                  'mp2'    => 'audio/mpeg',
 324                  'mp3'    => 'audio/mpeg',
 325                  'mpe'    => 'video/mpeg',
 326                  'mpeg'    => 'video/mpeg',
 327                  'mpg'    => 'video/mpeg',
 328                  'mpga'    => 'audio/mpeg',
 329                  'ms'    => 'application/x-troff-ms',
 330                  'msh'    => 'model/mesh',
 331                  'mxu'    => 'video/vnd.mpegurl',
 332                  'nc'    => 'application/x-netcdf',
 333                  'oda'    => 'application/oda',
 334                  'patch'    => 'text/diff',
 335                  'pbm'    => 'image/x-portable-bitmap',
 336                  'pdb'    => 'chemical/x-pdb',
 337                  'pdf'    => 'application/pdf',
 338                  'pgm'    => 'image/x-portable-graymap',
 339                  'pgn'    => 'application/x-chess-pgn',
 340                  'pgp'    => 'application/pgp',//added by skwashd
 341                  'php'    => 'application/x-httpd-php',
 342                  'php3'    => 'application/x-httpd-php3',
 343                  'pl'    => 'application/x-perl',
 344                  'pm'    => 'application/x-perl',
 345                  'png'    => 'image/png',
 346                  'pnm'    => 'image/x-portable-anymap',
 347                  'po'    => 'text/plain',
 348                  'ppm'    => 'image/x-portable-pixmap',
 349                  'ppt'    => 'application/vnd.ms-powerpoint',
 350                  'ps'    => 'application/postscript',
 351                  'qt'    => 'video/quicktime',
 352                  'ra'    => 'audio/x-realaudio',
 353                  'ram'    => 'audio/x-pn-realaudio',
 354                  'ras'    => 'image/x-cmu-raster',
 355                  'rgb'    => 'image/x-rgb',
 356                  'rm'    => 'audio/x-pn-realaudio',
 357                  'roff'    => 'application/x-troff',
 358                  'rpm'    => 'audio/x-pn-realaudio-plugin',
 359                  'rtf'    => 'text/rtf',
 360                  'rtx'    => 'text/richtext',
 361                  'sgm'    => 'text/sgml',
 362                  'sgml'    => 'text/sgml',
 363                  'sh'    => 'application/x-sh',
 364                  'shar'    => 'application/x-shar',
 365                  'shtml'    => 'text/html',
 366                  'silo'    => 'model/mesh',
 367                  'sit'    => 'application/x-stuffit',
 368                  'skd'    => 'application/x-koan',
 369                  'skm'    => 'application/x-koan',
 370                  'skp'    => 'application/x-koan',
 371                  'skt'    => 'application/x-koan',
 372                  'smi'    => 'application/smil',
 373                  'smil'    => 'application/smil',
 374                  'snd'    => 'audio/basic',
 375                  'so'    => 'application/octet-stream',
 376                  'spl'    => 'application/x-futuresplash',
 377                  'src'    => 'application/x-wais-source',
 378                  'stc'    => 'application/vnd.sun.xml.calc.template',
 379                  'std'    => 'application/vnd.sun.xml.draw.template',
 380                  'sti'    => 'application/vnd.sun.xml.impress.template',
 381                  'stw'    => 'application/vnd.sun.xml.writer.template',
 382                  'sv4cpio'    => 'application/x-sv4cpio',
 383                  'sv4crc'    => 'application/x-sv4crc',
 384                  'swf'    => 'application/x-shockwave-flash',
 385                  'sxc'    => 'application/vnd.sun.xml.calc',
 386                  'sxd'    => 'application/vnd.sun.xml.draw',
 387                  'sxg'    => 'application/vnd.sun.xml.writer.global',
 388                  'sxi'    => 'application/vnd.sun.xml.impress',
 389                  'sxm'    => 'application/vnd.sun.xml.math',
 390                  'sxw'    => 'application/vnd.sun.xml.writer',
 391                  't'    => 'application/x-troff',
 392                  'tar'    => 'application/x-tar',
 393                  'tcl'    => 'application/x-tcl',
 394                  'tex'    => 'application/x-tex',
 395                  'texi'    => 'application/x-texinfo',
 396                  'texinfo'    => 'application/x-texinfo',
 397                  'tgz'    => 'application/x-gtar',
 398                  'tif'    => 'image/tiff',
 399                  'tiff'    => 'image/tiff',
 400                  'tr'    => 'application/x-troff',
 401                  'tsv'    => 'text/tab-separated-values',
 402                  'txt'    => 'text/plain',
 403                  'ustar'    => 'application/x-ustar',
 404                  'vbs'    => 'text/plain', //added by skwashd - for obvious reasons
 405                  'vcd'    => 'application/x-cdlink',
 406                  'vcf'    => 'text/x-vcard',
 407                  'vcs'    => 'text/calendar',
 408                  'vfb'    => 'text/calendar',
 409                  'vrml'    => 'model/vrml',
 410                  'vsd'    => 'application/vnd.visio',
 411                  'wav'    => 'audio/x-wav',
 412                  'wax'    => 'audio/x-ms-wax',
 413                  'wbmp'    => 'image/vnd.wap.wbmp',
 414                  'wbxml'    => 'application/vnd.wap.wbxml',
 415                  'wm'    => 'video/x-ms-wm',
 416                  'wma'    => 'audio/x-ms-wma',
 417                  'wmd'    => 'application/x-ms-wmd',
 418                  'wml'    => 'text/vnd.wap.wml',
 419                  'wmlc'    => 'application/vnd.wap.wmlc',
 420                  'wmls'    => 'text/vnd.wap.wmlscript',
 421                  'wmlsc'    => 'application/vnd.wap.wmlscriptc',
 422                  'wmv'    => 'video/x-ms-wmv',
 423                  'wmx'    => 'video/x-ms-wmx',
 424                  'wmz'    => 'application/x-ms-wmz',
 425                  'wrl'    => 'model/vrml',
 426                  'wvx'    => 'video/x-ms-wvx',
 427                  'xbm'    => 'image/x-xbitmap',
 428                  'xht'    => 'application/xhtml+xml',
 429                  'xhtml'    => 'application/xhtml+xml',
 430                  'xls'    => 'application/vnd.ms-excel',
 431                  'xlt'    => 'application/vnd.ms-excel',
 432                  'xml'    => 'application/xml',
 433                  'xpm'    => 'image/x-xpixmap',
 434                  'xsl'    => 'text/xml',
 435                  'xwd'    => 'image/x-xwindowdump',
 436                  'xyz'    => 'chemical/x-xyz',
 437                  'z'    => 'application/x-compress',
 438                  'zip'    => 'application/zip',
 439              );
 440          }
 441  
 442          /**
 443          * Get the mime magic mapping file - last resort test
 444          *
 445          * Note Taken from horde.org - no copyright notice attached
 446          *
 447          * @author skwashd - converted to a function
 448          *
 449          * @return array mime magic data
 450          */
 451  		function get_mime_magic_file()
 452          {
 453              $mime_magic[0][30]["\145\166\141\154\40\42\145\170\145\143\40\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 454      $mime_magic[0][24]["\145\166\141\154\40\42\145\170\145\143\40\57\165\163\162\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 455              $mime_magic[0][23]["\103\157\155\155\157\156\40\163\165\142\144\151\162\145\143\164\157\162\151\145\163\72\40"] = 'text/x-patch';
 456              $mime_magic[0][23]["\75\74\154\151\163\164\76\156\74\160\162\157\164\157\143\157\154\40\142\142\156\55\155"] = 'application/data';
 457              $mime_magic[0][22]["\101\115\101\116\104\101\72\40\124\101\120\105\123\124\101\122\124\40\104\101\124\105"] = 'application/x-amanda-header';
 458              $mime_magic[0][22]["\107\106\61\120\101\124\103\110\61\60\60\60\111\104\43\60\60\60\60\60\62\60"] = 'audio/x-gus-patch';
 459              $mime_magic[0][22]["\107\106\61\120\101\124\103\110\61\61\60\60\111\104\43\60\60\60\60\60\62\60"] = 'audio/x-gus-patch';
 460              $mime_magic[0][22]["\43\41\11\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\142\141\163\150"] = 'application/x-sh';
 461              $mime_magic[0][22]["\43\41\11\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\147\141\167\153"] = 'application/x-awk';
 462              $mime_magic[0][22]["\43\41\11\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\156\141\167\153"] = 'application/x-awk';
 463              $mime_magic[0][22]["\43\41\11\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 464              $mime_magic[0][22]["\43\41\11\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\164\143\163\150"] = 'application/x-csh';
 465              $mime_magic[0][22]["\43\41\40\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\142\141\163\150"] = 'application/x-sh';
 466              $mime_magic[0][22]["\43\41\40\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\147\141\167\153"] = 'application/x-awk';
 467              $mime_magic[0][22]["\43\41\40\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\156\141\167\153"] = 'application/x-awk';
 468              $mime_magic[0][22]["\43\41\40\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 469              $mime_magic[0][22]["\43\41\40\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\164\143\163\150"] = 'application/x-csh';
 470              $mime_magic[0][21]["\43\41\11\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\141\163\150"] = 'application/x-zsh';
 471              $mime_magic[0][21]["\43\41\11\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\172\163\150"] = 'application/x-zsh';
 472              $mime_magic[0][21]["\43\41\40\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\141\163\150"] = 'application/x-zsh';
 473              $mime_magic[0][21]["\43\41\40\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\172\163\150"] = 'application/x-zsh';
 474              $mime_magic[0][21]["\43\41\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\142\141\163\150"] = 'application/x-sh';
 475              $mime_magic[0][21]["\43\41\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\147\141\167\153"] = 'application/x-awk';
 476              $mime_magic[0][21]["\43\41\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\156\141\167\153"] = 'application/x-awk';
 477              $mime_magic[0][21]["\43\41\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 478              $mime_magic[0][21]["\43\41\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\164\143\163\150"] = 'application/x-csh';
 479              $mime_magic[0][20]["\145\166\141\154\40\42\145\170\145\143\40\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 480              $mime_magic[0][20]["\43\41\11\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\141\145"] = 'text/script';
 481              $mime_magic[0][20]["\43\41\40\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\141\145"] = 'text/script';
 482              $mime_magic[0][20]["\43\41\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\141\163\150"] = 'application/x-sh';
 483              $mime_magic[0][20]["\43\41\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\172\163\150"] = 'application/x-zsh';
 484              $mime_magic[0][19]["\103\162\145\141\164\151\166\145\40\126\157\151\143\145\40\106\151\154\145"] = 'audio/x-voc';
 485              $mime_magic[0][19]["\41\74\141\162\143\150\76\156\137\137\137\137\137\137\137\137\137\137\105"] = 'application/x-ar';
 486              $mime_magic[0][19]["\41\74\141\162\143\150\76\156\137\137\137\137\137\137\137\137\66\64\105"] = 'application/data';
 487              $mime_magic[0][19]["\43\41\57\165\163\162\57\154\157\143\141\154\57\142\151\156\57\141\145"] = 'text/script';
 488              $mime_magic[0][18]["\106\151\114\145\123\164\101\162\124\146\111\154\105\163\124\141\122\164"] = 'text/x-apple-binscii';
 489              $mime_magic[0][18]["\43\41\40\57\165\163\162\57\154\157\143\141\154\57\164\143\163\150"] = 'application/x-csh';
 490              $mime_magic[0][18]["\45\41\120\123\55\101\144\157\142\145\106\157\156\164\55\61\56\60"] = 'font/type1';
 491              $mime_magic[0][17]["\43\41\57\165\163\162\57\154\157\143\141\154\57\164\143\163\150"] = 'application/x-csh';
 492              $mime_magic[0][16]["\105\170\164\145\156\144\145\144\40\115\157\144\165\154\145\72"] = 'audio/x-ft2-mod';
 493              $mime_magic[0][16]["\123\164\141\162\164\106\157\156\164\115\145\164\162\151\143\163"] = 'font/x-sunos-news';
 494              $mime_magic[0][16]["\43\41\11\57\165\163\162\57\142\151\156\57\147\141\167\153"] = 'application/x-awk';
 495              $mime_magic[0][16]["\43\41\11\57\165\163\162\57\142\151\156\57\156\141\167\153"] = 'application/x-awk';
 496              $mime_magic[0][16]["\43\41\11\57\165\163\162\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 497              $mime_magic[0][16]["\43\41\40\57\165\163\162\57\142\151\156\57\147\141\167\153"] = 'application/x-awk';
 498              $mime_magic[0][16]["\43\41\40\57\165\163\162\57\142\151\156\57\156\141\167\153"] = 'application/x-awk';
 499              $mime_magic[0][16]["\43\41\40\57\165\163\162\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 500              $mime_magic[0][16]["\74\115\141\153\145\162\104\151\143\164\151\157\156\141\162\171"] = 'application/x-framemaker';
 501              $mime_magic[0][16]["\74\115\141\153\145\162\123\143\162\145\145\156\106\157\156\164"] = 'font/x-framemaker';
 502              $mime_magic[0][15]["\43\41\11\57\165\163\162\57\142\151\156\57\141\167\153"] = 'application/x-awk';
 503              $mime_magic[0][15]["\43\41\40\57\165\163\162\57\142\151\156\57\141\167\153"] = 'application/x-awk';
 504              $mime_magic[0][15]["\43\41\57\165\163\162\57\142\151\156\57\147\141\167\153"] = 'application/x-awk';
 505              $mime_magic[0][15]["\43\41\57\165\163\162\57\142\151\156\57\156\141\167\153"] = 'application/x-awk';
 506              $mime_magic[0][15]["\43\41\57\165\163\162\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 507              $mime_magic[0][14]["\41\74\141\162\143\150\76\156\144\145\142\151\141\156"] = 'application/x-dpkg';
 508              $mime_magic[0][14]["\43\41\57\165\163\162\57\142\151\156\57\141\167\153"] = 'application/x-awk';
 509              $mime_magic[0][14]["\74\41\104\117\103\124\131\120\105\40\110\124\115\114"] = 'text/html';
 510              $mime_magic[0][14]["\74\41\144\157\143\164\171\160\145\40\150\164\155\154"] = 'text/html';
 511              $mime_magic[0][13]["\107\111\115\120\40\107\162\141\144\151\145\156\164"] = 'application/x-gimp-gradient';
 512              $mime_magic[0][12]["\122\145\164\165\162\156\55\120\141\164\150\72"] = 'message/rfc822';
 513              $mime_magic[0][12]["\43\41\11\57\142\151\156\57\142\141\163\150"] = 'application/x-sh';
 514              $mime_magic[0][12]["\43\41\11\57\142\151\156\57\147\141\167\153"] = 'application/x-awk';
 515              $mime_magic[0][12]["\43\41\11\57\142\151\156\57\156\141\167\153"] = 'application/x-awk';
 516              $mime_magic[0][12]["\43\41\11\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 517              $mime_magic[0][12]["\43\41\11\57\142\151\156\57\164\143\163\150"] = 'application/x-csh';
 518              $mime_magic[0][12]["\43\41\40\57\142\151\156\57\142\141\163\150"] = 'application/x-sh';
 519              $mime_magic[0][12]["\43\41\40\57\142\151\156\57\147\141\167\153"] = 'application/x-awk';
 520              $mime_magic[0][12]["\43\41\40\57\142\151\156\57\156\141\167\153"] = 'application/x-awk';
 521              $mime_magic[0][12]["\43\41\40\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 522              $mime_magic[0][12]["\43\41\40\57\142\151\156\57\164\143\163\150"] = 'application/x-csh';
 523              $mime_magic[0][11]["\43\41\11\57\142\151\156\57\141\167\153"] = 'application/x-awk';
 524              $mime_magic[0][11]["\43\41\11\57\142\151\156\57\143\163\150"] = 'application/x-csh';
 525              $mime_magic[0][11]["\43\41\11\57\142\151\156\57\153\163\150"] = 'application/x-ksh';
 526              $mime_magic[0][11]["\43\41\40\57\142\151\156\57\141\167\153"] = 'application/x-awk';
 527              $mime_magic[0][11]["\43\41\40\57\142\151\156\57\143\163\150"] = 'application/x-csh';
 528              $mime_magic[0][11]["\43\41\40\57\142\151\156\57\153\163\150"] = 'application/x-ksh';
 529              $mime_magic[0][11]["\43\41\57\142\151\156\57\142\141\163\150"] = 'application/x-sh';
 530              $mime_magic[0][11]["\43\41\57\142\151\156\57\147\141\167\153"] = 'application/x-awk';
 531              $mime_magic[0][11]["\43\41\57\142\151\156\57\156\141\167\153"] = 'application/x-awk';
 532              $mime_magic[0][11]["\43\41\57\142\151\156\57\160\145\162\154"] = 'application/x-perl';
 533              $mime_magic[0][11]["\43\41\57\142\151\156\57\164\143\163\150"] = 'application/x-csh';
 534              $mime_magic[0][10]["\102\151\164\155\141\160\146\151\154\145"] = 'image/unknown';
 535              $mime_magic[0][10]["\123\124\101\122\124\106\117\116\124\40"] = 'font/x-bdf';
 536              $mime_magic[0][10]["\43\41\11\57\142\151\156\57\162\143"] = 'text/script';
 537              $mime_magic[0][10]["\43\41\11\57\142\151\156\57\163\150"] = 'application/x-sh';
 538              $mime_magic[0][10]["\43\41\40\57\142\151\156\57\162\143"] = 'text/script';
 539              $mime_magic[0][10]["\43\41\40\57\142\151\156\57\163\150"] = 'application/x-sh';
 540              $mime_magic[0][10]["\43\41\57\142\151\156\57\141\167\153"] = 'application/x-awk';
 541              $mime_magic[0][10]["\43\41\57\142\151\156\57\143\163\150"] = 'application/x-csh';
 542              $mime_magic[0][10]["\43\41\57\142\151\156\57\153\163\150"] = 'application/x-ksh';
 543              $mime_magic[0][10]["\74\115\141\153\145\162\106\151\154\145"] = 'application/x-framemaker';
 544              $mime_magic[0][9]["\122\145\143\145\151\166\145\144\72"] = 'message/rfc822';
 545              $mime_magic[0][9]["\123\164\141\162\164\106\157\156\164"] = 'font/x-sunos-news';
 546              $mime_magic[0][9]["\211\114\132\117\0\15\12\32\12"] = 'application/data';
 547              $mime_magic[0][9]["\43\41\57\142\151\156\57\162\143"] = 'text/script';
 548              $mime_magic[0][9]["\43\41\57\142\151\156\57\163\150"] = 'application/x-sh';
 549              $mime_magic[0][9]["\55\162\157\155\61\146\163\55\60"] = 'application/x-filesystem';
 550              $mime_magic[0][9]["\74\102\157\157\153\106\151\154\145"] = 'application/x-framemaker';
 551              $mime_magic[0][8]["\117\156\154\171\40\151\156\40"] = 'text/x-patch';
 552              $mime_magic[0][8]["\147\151\155\160\40\170\143\146"] = 'application/x-gimp-image';
 553              $mime_magic[0][8]["\155\163\147\143\141\164\60\61"] = 'application/x-locale';
 554              $mime_magic[0][8]["\32\141\162\143\150\151\166\145"] = 'application/data';
 555              $mime_magic[0][8]["\41\74\120\104\106\76\41\156"] = 'application/x-prof';
 556              $mime_magic[0][8]["\74\115\111\106\106\151\154\145"] = 'application/x-framemaker';
 557              $mime_magic[0][7]["\101\162\164\151\143\154\145"] = 'message/news';
 558              $mime_magic[0][7]["\120\103\104\137\117\120\101"] = 'x/x-photo-cd-overfiew-file';
 559              $mime_magic[0][7]["\351\54\1\112\101\115\11"] = 'application/data';
 560              $mime_magic[0][7]["\41\74\141\162\143\150\76"] = 'application/x-ar';
 561              $mime_magic[0][7]["\72\40\163\150\145\154\154"] = 'application/data';
 562              $mime_magic[0][6]["\116\165\106\151\154\145"] = 'application/data';
 563              $mime_magic[0][6]["\116\365\106\351\154\345"] = 'application/data';
 564              $mime_magic[0][6]["\60\67\60\67\60\61"] = 'application/x-cpio';
 565              $mime_magic[0][6]["\60\67\60\67\60\62"] = 'application/x-cpio';
 566              $mime_magic[0][6]["\60\67\60\67\60\67"] = 'application/x-cpio';
 567              $mime_magic[0][6]["\74\115\141\153\145\162"] = 'application/x-framemaker';
 568              $mime_magic[0][6]["\74\124\111\124\114\105"] = 'text/html';
 569              $mime_magic[0][6]["\74\164\151\164\154\145"] = 'text/html';
 570              $mime_magic[0][5]["\0\1\0\0\0"] = 'font/ttf';
 571              $mime_magic[0][5]["\0\4\36\212\200"] = 'application/core';
 572              $mime_magic[0][5]["\102\101\102\131\114"] = 'message/x-gnu-rmail';
 573              $mime_magic[0][5]["\102\105\107\111\116"] = 'application/x-awk';
 574              $mime_magic[0][5]["\103\157\162\145\1"] = 'application/x-executable-file';
 575              $mime_magic[0][5]["\104\61\56\60\15"] = 'font/x-speedo';
 576              $mime_magic[0][5]["\106\162\157\155\72"] = 'message/rfc822';
 577              $mime_magic[0][5]["\115\101\123\137\125"] = 'audio/x-multimate-mod';
 578              $mime_magic[0][5]["\120\117\136\121\140"] = 'text/vnd.ms-word';
 579              $mime_magic[0][5]["\120\141\164\150\72"] = 'message/news';
 580              $mime_magic[0][5]["\130\162\145\146\72"] = 'message/news';
 581              $mime_magic[0][5]["\144\151\146\146\40"] = 'text/x-patch';
 582              $mime_magic[0][5]["\225\64\62\62\336"] = 'application/x-locale';
 583              $mime_magic[0][5]["\336\62\62\64\225"] = 'application/x-locale';
 584              $mime_magic[0][5]["\74\110\105\101\104"] = 'text/html';
 585              $mime_magic[0][5]["\74\110\124\115\114"] = 'text/html';
 586              $mime_magic[0][5]["\74\150\145\141\144"] = 'text/html';
 587              $mime_magic[0][5]["\74\150\164\155\154"] = 'text/html';
 588              $mime_magic[0][5]["\75\74\141\162\76"] = 'application/x-ar';
 589              $mime_magic[0][4]["\0\0\0\314"] = 'application/x-executable-file';
 590              $mime_magic[0][4]["\0\0\0\4"] = 'font/x-snf';
 591              $mime_magic[0][4]["\0\0\1\107"] = 'application/x-object-file';
 592              $mime_magic[0][4]["\0\0\1\113"] = 'application/x-executable-file';
 593              $mime_magic[0][4]["\0\0\1\115"] = 'application/x-executable-file';
 594              $mime_magic[0][4]["\0\0\1\117"] = 'application/x-executable-file';
 595              $mime_magic[0][4]["\0\0\1\201"] = 'application/x-object-file';
 596              $mime_magic[0][4]["\0\0\1\207"] = 'application/data';
 597              $mime_magic[0][4]["\0\0\1\263"] = 'video/mpeg';
 598              $mime_magic[0][4]["\0\0\1\272"] = 'video/mpeg';
 599              $mime_magic[0][4]["\0\0\1\6"] = 'application/x-executable-file';
 600              $mime_magic[0][4]["\0\0\201\154"] = 'application/x-apl-workspace';
 601              $mime_magic[0][4]["\0\0\377\145"] = 'application/x-library-file';
 602              $mime_magic[0][4]["\0\0\377\155"] = 'application/data';
 603              $mime_magic[0][4]["\0\0\3\347"] = 'application/x-library-file';
 604              $mime_magic[0][4]["\0\0\3\363"] = 'application/x-executable-file';
 605              $mime_magic[0][4]["\0\144\163\56"] = 'audio/basic';
 606              $mime_magic[0][4]["\0\1\22\127"] = 'application/core';
 607              $mime_magic[0][4]["\0\22\326\207"] = 'image/x11';
 608              $mime_magic[0][4]["\0\3\233\355"] = 'application/data';
 609              $mime_magic[0][4]["\0\3\233\356"] = 'application/data';
 610              $mime_magic[0][4]["\0\5\26\0"] = 'application/data';
 611              $mime_magic[0][4]["\0\5\26\7"] = 'application/data';
 612              $mime_magic[0][4]["\0\5\61\142"] = 'application/x-db';
 613              $mime_magic[0][4]["\0\6\25\141"] = 'application/x-db';
 614              $mime_magic[0][4]["\103\124\115\106"] = 'audio/x-cmf';
 615              $mime_magic[0][4]["\105\115\117\104"] = 'audio/x-emod';
 616              $mime_magic[0][4]["\106\106\111\114"] = 'font/ttf';
 617              $mime_magic[0][4]["\106\117\116\124"] = 'font/x-vfont';
 618              $mime_magic[0][4]["\107\104\102\115"] = 'application/x-gdbm';
 619              $mime_magic[0][4]["\107\111\106\70"] = 'image/gif';
 620              $mime_magic[0][4]["\10\16\12\17"] = 'application/data';
 621              $mime_magic[0][4]["\110\120\101\113"] = 'application/data';
 622              $mime_magic[0][4]["\111\111\116\61"] = 'image/tiff';
 623              $mime_magic[0][4]["\111\111\52\0"] = 'image/tiff';
 624              $mime_magic[0][4]["\114\104\110\151"] = 'application/data';
 625              $mime_magic[0][4]["\114\127\106\116"] = 'font/type1';
 626              $mime_magic[0][4]["\115\115\0\52"] = 'image/tiff';
 627              $mime_magic[0][4]["\115\117\126\111"] = 'video/x-sgi-movie';
 628              $mime_magic[0][4]["\115\124\150\144"] = 'audio/midi';
 629              $mime_magic[0][4]["\115\247\356\350"] = 'font/x-hp-windows';
 630              $mime_magic[0][4]["\116\124\122\113"] = 'audio/x-multitrack';
 631              $mime_magic[0][4]["\120\113\3\4"] = 'application/zip';
 632              $mime_magic[0][4]["\122\111\106\106"] = 'audio/x-wav';
 633              $mime_magic[0][4]["\122\141\162\41"] = 'application/x-rar';
 634              $mime_magic[0][4]["\123\121\123\110"] = 'application/data';
 635              $mime_magic[0][4]["\124\101\104\123"] = 'application/x-tads-game';
 636              $mime_magic[0][4]["\125\103\62\32"] = 'application/data';
 637              $mime_magic[0][4]["\125\116\60\65"] = 'audio/x-mikmod-uni';
 638              $mime_magic[0][4]["\12\17\10\16"] = 'application/data';
 639              $mime_magic[0][4]["\131\246\152\225"] = 'x/x-image-sun-raster';
 640              $mime_magic[0][4]["\145\377\0\0"] = 'application/x-ar';
 641              $mime_magic[0][4]["\150\163\151\61"] = 'image/x-jpeg-proprietary';
 642              $mime_magic[0][4]["\16\10\17\12"] = 'application/data';
 643              $mime_magic[0][4]["\177\105\114\106"] = 'application/x-executable-file';
 644              $mime_magic[0][4]["\17\12\16\10"] = 'application/data';
 645              $mime_magic[0][4]["\1\130\41\246"] = 'application/core';
 646              $mime_magic[0][4]["\1\146\143\160"] = 'font/x-pcf';
 647              $mime_magic[0][4]["\211\120\116\107"] = 'image/x-png';
 648              $mime_magic[0][4]["\23\127\232\316"] = 'application/x-gdbm';
 649              $mime_magic[0][4]["\23\172\51\104"] = 'font/x-sunos-news';
 650              $mime_magic[0][4]["\23\172\51\107"] = 'font/x-sunos-news';
 651              $mime_magic[0][4]["\23\172\51\120"] = 'font/x-sunos-news';
 652              $mime_magic[0][4]["\23\172\51\121"] = 'font/x-sunos-news';
 653              $mime_magic[0][4]["\24\2\131\31"] = 'font/x-libgrx';
 654              $mime_magic[0][4]["\260\61\63\140"] = 'application/x-bootable';
 655              $mime_magic[0][4]["\2\10\1\10"] = 'application/x-executable-file';
 656              $mime_magic[0][4]["\2\10\1\6"] = 'application/x-executable-file';
 657              $mime_magic[0][4]["\2\10\1\7"] = 'application/x-executable-file';
 658              $mime_magic[0][4]["\2\10\377\145"] = 'application/x-library-file';
 659              $mime_magic[0][4]["\2\12\1\10"] = 'application/x-executable-file';
 660              $mime_magic[0][4]["\2\12\1\7"] = 'application/x-executable-file';
 661              $mime_magic[0][4]["\2\12\377\145"] = 'application/x-library-file';
 662              $mime_magic[0][4]["\2\13\1\10"] = 'application/x-executable-file';
 663              $mime_magic[0][4]["\2\13\1\13"] = 'application/x-executable-file';
 664              $mime_magic[0][4]["\2\13\1\15"] = 'application/x-library-file';
 665              $mime_magic[0][4]["\2\13\1\16"] = 'application/x-library-file';
 666              $mime_magic[0][4]["\2\13\1\6"] = 'application/x-object-file';
 667              $mime_magic[0][4]["\2\13\1\7"] = 'application/x-executable-file';
 668              $mime_magic[0][4]["\2\14\1\10"] = 'application/x-executable-file';
 669              $mime_magic[0][4]["\2\14\1\13"] = 'application/x-executable-file';
 670              $mime_magic[0][4]["\2\14\1\14"] = 'application/x-lisp';
 671              $mime_magic[0][4]["\2\14\1\15"] = 'application/x-library-file';
 672              $mime_magic[0][4]["\2\14\1\16"] = 'application/x-library-file';
 673              $mime_magic[0][4]["\2\14\1\6"] = 'application/x-executable-file';
 674              $mime_magic[0][4]["\2\14\1\7"] = 'application/x-executable-file';
 675              $mime_magic[0][4]["\2\14\377\145"] = 'application/x-library-file';
 676              $mime_magic[0][4]["\2\20\1\10"] = 'application/x-executable-file';
 677              $mime_magic[0][4]["\2\20\1\13"] = 'application/x-executable-file';
 678              $mime_magic[0][4]["\2\20\1\15"] = 'application/x-library-file';
 679              $mime_magic[0][4]["\2\20\1\16"] = 'application/x-library-file';
 680              $mime_magic[0][4]["\2\20\1\6"] = 'application/x-object-file';
 681              $mime_magic[0][4]["\2\20\1\7"] = 'application/x-executable-file';
 682              $mime_magic[0][4]["\2\24\1\10"] = 'application/x-executable-file';
 683              $mime_magic[0][4]["\2\24\1\13"] = 'application/x-executable-file';
 684              $mime_magic[0][4]["\2\24\1\15"] = 'application/x-object-file';
 685              $mime_magic[0][4]["\2\24\1\16"] = 'application/x-library-file';
 686              $mime_magic[0][4]["\2\24\1\6"] = 'application/x-object-file';
 687              $mime_magic[0][4]["\2\24\1\7"] = 'application/x-executable-file';
 688              $mime_magic[0][4]["\361\60\100\273"] = 'image/x-cmu-raster';
 689              $mime_magic[0][4]["\366\366\366\366"] = 'application/x-pc-floppy';
 690              $mime_magic[0][4]["\377\106\117\116"] = 'font/x-dos';
 691              $mime_magic[0][4]["\41\74\141\162"] = 'application/x-ar';
 692              $mime_magic[0][4]["\43\41\11\57"] = 'text/script';
 693              $mime_magic[0][4]["\43\41\40\57"] = 'text/script';
 694              $mime_magic[0][4]["\52\123\124\101"] = 'application/data';
 695              $mime_magic[0][4]["\52\52\52\40"] = 'text/x-patch';
 696              $mime_magic[0][4]["\56\162\141\375"] = 'audio/x-pn-realaudio';
 697              $mime_magic[0][4]["\56\163\156\144"] = 'audio/basic';
 698              $mime_magic[0][4]["\61\143\167\40"] = 'application/data';
 699              $mime_magic[0][4]["\61\276\0\0"] = 'text/vnd.ms-word';
 700              $mime_magic[0][4]["\62\62\67\70"] = 'application/data';
 701              $mime_magic[0][4]["\74\115\115\114"] = 'application/x-framemaker';
 702              $mime_magic[0][4]["\74\141\162\76"] = 'application/x-ar';
 703              $mime_magic[0][3]["\102\132\150"] = 'application/x-bzip2';
 704              $mime_magic[0][3]["\106\101\122"] = 'audio/mod';
 705              $mime_magic[0][3]["\115\124\115"] = 'audio/x-multitrack';
 706              $mime_magic[0][3]["\123\102\111"] = 'audio/x-sbi';
 707              $mime_magic[0][3]["\124\117\103"] = 'audio/x-toc';
 708              $mime_magic[0][3]["\12\107\114"] = 'application/data';
 709              $mime_magic[0][3]["\146\154\143"] = 'application/x-font';
 710              $mime_magic[0][3]["\146\154\146"] = 'font/x-figlet';
 711              $mime_magic[0][3]["\33\105\33"] = 'image/x-pcl-hp';
 712              $mime_magic[0][3]["\33\143\33"] = 'application/data';
 713              $mime_magic[0][3]["\377\377\174"] = 'application/data';
 714              $mime_magic[0][3]["\377\377\176"] = 'application/data';
 715              $mime_magic[0][3]["\377\377\177"] = 'application/data';
 716              $mime_magic[0][3]["\43\41\40"] = 'text/script';
 717              $mime_magic[0][3]["\43\41\57"] = 'text/script';
 718              $mime_magic[0][3]["\4\45\41"] = 'application/postscript';
 719              $mime_magic[0][3]["\55\150\55"] = 'application/data';
 720              $mime_magic[0][3]["\61\143\167"] = 'application/data';
 721              $mime_magic[0][2]["\0\0"] = 'application/x-executable-file';
 722              $mime_magic[0][2]["\102\115"] = 'image/x-bmp';
 723              $mime_magic[0][2]["\102\132"] = 'application/x-bzip';
 724              $mime_magic[0][2]["\111\103"] = 'image/x-ico';
 725              $mime_magic[0][2]["\112\116"] = 'audio/x-669-mod';
 726              $mime_magic[0][2]["\115\132"] = 'application/x-ms-dos-executable';
 727              $mime_magic[0][2]["\120\61"] = 'image/x-portable-bitmap';
 728              $mime_magic[0][2]["\120\62"] = 'image/x-portable-graymap';
 729              $mime_magic[0][2]["\120\63"] = 'image/x-portable-pixmap';
 730              $mime_magic[0][2]["\120\64"] = 'image/x-portable-bitmap';
 731              $mime_magic[0][2]["\120\65"] = 'image/x-portable-graymap';
 732              $mime_magic[0][2]["\120\66"] = 'image/x-portable-pixmap';
 733              $mime_magic[0][2]["\151\146"] = 'audio/x-669-mod';
 734              $mime_magic[0][2]["\161\307"] = 'application/x-cpio';
 735              $mime_magic[0][2]["\166\377"] = 'application/data';
 736              $mime_magic[0][2]["\1\110"] = 'application/x-executable-file';
 737              $mime_magic[0][2]["\1\111"] = 'application/x-executable-file';
 738              $mime_magic[0][2]["\1\124"] = 'application/data';
 739              $mime_magic[0][2]["\1\125"] = 'application/x-executable-file';
 740              $mime_magic[0][2]["\1\160"] = 'application/x-executable-file';
 741              $mime_magic[0][2]["\1\161"] = 'application/x-executable-file';
 742              $mime_magic[0][2]["\1\175"] = 'application/x-executable-file';
 743              $mime_magic[0][2]["\1\177"] = 'application/x-executable-file';
 744              $mime_magic[0][2]["\1\20"] = 'application/x-executable-file';
 745              $mime_magic[0][2]["\1\203"] = 'application/x-executable-file';
 746              $mime_magic[0][2]["\1\21"] = 'application/x-executable-file';
 747              $mime_magic[0][2]["\1\210"] = 'application/x-executable-file';
 748              $mime_magic[0][2]["\1\217"] = 'application/x-object-file';
 749              $mime_magic[0][2]["\1\224"] = 'application/x-executable-file';
 750              $mime_magic[0][2]["\1\227"] = 'application/x-executable-file';
 751              $mime_magic[0][2]["\1\332"] = 'x/x-image-sgi';
 752              $mime_magic[0][2]["\1\36"] = 'font/x-vfont';
 753              $mime_magic[0][2]["\1\6"] = 'application/x-executable-file';
 754              $mime_magic[0][2]["\307\161"] = 'application/x-bcpio';
 755              $mime_magic[0][2]["\313\5"] = 'application/data';
 756              $mime_magic[0][2]["\352\140"] = 'application/x-arj';
 757              $mime_magic[0][2]["\367\131"] = 'font/x-tex';
 758              $mime_magic[0][2]["\367\203"] = 'font/x-tex';
 759              $mime_magic[0][2]["\367\312"] = 'font/x-tex';
 760              $mime_magic[0][2]["\36\1"] = 'font/x-vfont';
 761              $mime_magic[0][2]["\375\166"] = 'application/x-lzh';
 762              $mime_magic[0][2]["\376\166"] = 'application/data';
 763              $mime_magic[0][2]["\377\145"] = 'application/data';
 764              $mime_magic[0][2]["\377\155"] = 'application/data';
 765              $mime_magic[0][2]["\377\166"] = 'application/data';
 766              $mime_magic[0][2]["\377\330"] = 'image/jpeg';
 767              $mime_magic[0][2]["\377\37"] = 'application/data';
 768              $mime_magic[0][2]["\37\213"] = 'application/x-gzip';
 769              $mime_magic[0][2]["\37\235"] = 'application/compress';
 770              $mime_magic[0][2]["\37\236"] = 'application/data';
 771              $mime_magic[0][2]["\37\237"] = 'application/data';
 772              $mime_magic[0][2]["\37\240"] = 'application/data';
 773              $mime_magic[0][2]["\37\36"] = 'application/data';
 774              $mime_magic[0][2]["\37\37"] = 'application/data';
 775              $mime_magic[0][2]["\37\377"] = 'application/data';
 776              $mime_magic[0][2]["\45\41"] = 'application/postscript';
 777              $mime_magic[0][2]["\4\66"] = 'font/linux-psf';
 778              $mime_magic[0][2]["\57\57"] = 'text/cpp';
 779              $mime_magic[0][2]["\5\1"] = 'application/x-locale';
 780              $mime_magic[0][2]["\6\1"] = 'application/x-executable-file';
 781              $mime_magic[0][2]["\6\2"] = 'application/x-alan-adventure-game';
 782              $mime_magic[0][2]["\7\1"] = 'application/x-executable-file';
 783              $mime_magic[1][3]["\120\116\107"] = 'image/x-png';
 784              $mime_magic[1][3]["\127\120\103"] = 'text/vnd.wordperfect';
 785              $mime_magic[2][6]["\55\154\150\64\60\55"] = 'application/x-lha';
 786              $mime_magic[2][5]["\55\154\150\144\55"] = 'application/x-lha';
 787              $mime_magic[2][5]["\55\154\150\60\55"] = 'application/x-lha';
 788              $mime_magic[2][5]["\55\154\150\61\55"] = 'application/x-lha';
 789              $mime_magic[2][5]["\55\154\150\62\55"] = 'application/x-lha';
 790              $mime_magic[2][5]["\55\154\150\63\55"] = 'application/x-lha';
 791              $mime_magic[2][5]["\55\154\150\64\55"] = 'application/x-lha';
 792              $mime_magic[2][5]["\55\154\150\65\55"] = 'application/x-lha';
 793              $mime_magic[2][5]["\55\154\172\163\55"] = 'application/x-lha';
 794              $mime_magic[2][5]["\55\154\172\64\55"] = 'application/x-lha';
 795              $mime_magic[2][5]["\55\154\172\65\55"] = 'application/x-lha';
 796              $mime_magic[2][2]["\0\21"] = 'font/x-tex-tfm';
 797              $mime_magic[2][2]["\0\22"] = 'font/x-tex-tfm';
 798              $mime_magic[4][4]["\155\144\141\164"] = 'video/quicktime';
 799              $mime_magic[4][4]["\155\157\157\166"] = 'video/quicktime';
 800              $mime_magic[4][4]["\160\151\160\145"] = 'application/data';
 801              $mime_magic[4][4]["\160\162\157\146"] = 'application/data';
 802              $mime_magic[4][2]["\257\21"] = 'video/fli';
 803              $mime_magic[4][2]["\257\22"] = 'video/flc';
 804              $mime_magic[6][18]["\45\41\120\123\55\101\144\157\142\145\106\157\156\164\55\61\56\60"] = 'font/type1';
 805              $mime_magic[7][22]["\357\20\60\60\60\60\60\60\60\60\60\60\60\60\60\60\60\60\60\60\60\60"] = 'application/core';
 806              $mime_magic[7][4]["\0\105\107\101"] = 'font/x-dos';
 807              $mime_magic[7][4]["\0\126\111\104"] = 'font/x-dos';
 808              $mime_magic[8][4]["\23\172\53\105"] = 'font/x-sunos-news';
 809              $mime_magic[8][4]["\23\172\53\110"] = 'font/x-sunos-news';
 810              $mime_magic[10][25]["\43\40\124\150\151\163\40\151\163\40\141\40\163\150\145\154\154\40\141\162\143\150\151\166\145"] = 'application/x-shar';
 811              $mime_magic[20][4]["\107\111\115\120"] = 'application/x-gimp-brush';
 812              $mime_magic[20][4]["\107\120\101\124"] = 'application/x-gimp-pattern';
 813              $mime_magic[20][4]["\375\304\247\334"] = 'application/x-zoo';
 814              $mime_magic[21][8]["\41\123\103\122\105\101\115\41"] = 'audio/x-st2-mod';
 815              $mime_magic[24][4]["\0\0\352\153"] = 'application/x-dump';
 816              $mime_magic[24][4]["\0\0\352\154"] = 'application/x-dump';
 817              $mime_magic[24][4]["\0\0\352\155"] = 'application/data';
 818              $mime_magic[24][4]["\0\0\352\156"] = 'application/data';
 819              $mime_magic[65][4]["\106\106\111\114"] = 'font/ttf';
 820              $mime_magic[65][4]["\114\127\106\116"] = 'font/type1';
 821              $mime_magic[257][8]["\165\163\164\141\162\40\40\60"] = 'application/x-gtar';
 822              $mime_magic[257][6]["\165\163\164\141\162\60"] = 'application/x-tar';
 823              $mime_magic[0774][2]["\332\276"] = 'application/data';
 824              $mime_magic[1080][4]["\103\104\70\61"] = 'audio/x-oktalyzer-mod';
 825              $mime_magic[1080][4]["\106\114\124\64"] = 'audio/x-startracker-mod';
 826              $mime_magic[1080][4]["\115\41\113\41"] = 'audio/x-protracker-mod';
 827              $mime_magic[1080][4]["\115\56\113\56"] = 'audio/x-protracker-mod';
 828              $mime_magic[1080][4]["\117\113\124\101"] = 'audio/x-oktalyzer-mod';
 829              $mime_magic[1080][4]["\61\66\103\116"] = 'audio/x-taketracker-mod';
 830              $mime_magic[1080][4]["\63\62\103\116"] = 'audio/x-taketracker-mod';
 831              $mime_magic[1080][4]["\64\103\110\116"] = 'audio/x-fasttracker-mod';
 832              $mime_magic[1080][4]["\66\103\110\116"] = 'audio/x-fasttracker-mod';
 833              $mime_magic[1080][4]["\70\103\110\116"] = 'audio/x-fasttracker-mod';
 834              $mime_magic[2048][7]["\120\103\104\137\111\120\111"] = 'x/x-photo-cd-pack-file';
 835              $mime_magic[2080][29]["\115\151\143\162\157\163\157\146\164\40\105\170\143\145\154\40\65\56\60\40\127\157\162\153\163\150\145\145\164"] = 'application/vnd.ms-excel';
 836              $mime_magic[2080][27]["\115\151\143\162\157\163\157\146\164\40\127\157\162\144\40\66\56\60\40\104\157\143\165\155\145\156\164"] = 'text/vnd.ms-word';
 837              $mime_magic[2080][26]["\104\157\143\165\155\145\156\164\157\40\115\151\143\162\157\163\157\146\164\40\127\157\162\144\40\66"] = 'text/vnd.ms-word';
 838              $mime_magic[2112][9]["\115\123\127\157\162\144\104\157\143"] = 'text/vnd.ms-word';
 839              $mime_magic[2114][5]["\102\151\146\146\65"] = 'application/vnd.ms-excel';
 840              $mime_magic[4098][7]["\104\117\123\106\117\116\124"] = 'font/x-dos';
 841              $mime_magic[68158480][2]["\23\177"] = 'application/x-filesystem';
 842              $mime_magic[68158480][2]["\23\217"] = 'application/x-filesystem';
 843              $mime_magic[68158480][2]["\44\150"] = 'application/x-filesystem';
 844              $mime_magic[68158480][2]["\44\170"] = 'application/x-filesystem';
 845              $mime_magic[70779960][2]["\357\123"] = 'application/x-linux-ext2fs';
 846  
 847              return $mime_magic;
 848          }
 849      }
 850  ?>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7