File indexing completed on 2025-02-02 05:44:55
0001 <?php 0002 ///////////////////////////////////////////////////////////////// 0003 /// getID3() by James Heinrich <info@getid3.org> // 0004 // available at http://getid3.sourceforge.net // 0005 // or http://www.getid3.org // 0006 // also https://github.com/JamesHeinrich/getID3 // 0007 ///////////////////////////////////////////////////////////////// 0008 // See readme.txt for more details // 0009 ///////////////////////////////////////////////////////////////// 0010 // // 0011 // module.misc.msoffice.php // 0012 // module for analyzing MS Office (.doc, .xls, etc) files // 0013 // dependencies: NONE // 0014 // /// 0015 ///////////////////////////////////////////////////////////////// 0016 0017 0018 class getid3_msoffice extends getid3_handler 0019 { 0020 0021 public function Analyze() { 0022 $info = &$this->getid3->info; 0023 0024 $this->fseek($info['avdataoffset']); 0025 $DOCFILEheader = $this->fread(8); 0026 $magic = "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1"; 0027 if (substr($DOCFILEheader, 0, 8) != $magic) { 0028 $info['error'][] = 'Expecting "'.getid3_lib::PrintHexBytes($magic).'" at '.$info['avdataoffset'].', found '.getid3_lib::PrintHexBytes(substr($DOCFILEheader, 0, 8)).' instead.'; 0029 return false; 0030 } 0031 $info['fileformat'] = 'msoffice'; 0032 0033 $info['error'][] = 'MS Office (.doc, .xls, etc) parsing not enabled in this version of getID3() ['.$this->getid3->version().']'; 0034 return false; 0035 0036 } 0037 0038 }