12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- if (!defined('GETID3_INCLUDEPATH')) {
- exit;
- }
- class getid3_msoffice extends getid3_handler
- {
-
- public function Analyze() {
- $info = &$this->getid3->info;
- $this->fseek($info['avdataoffset']);
- $DOCFILEheader = $this->fread(8);
- $magic = "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1";
- if (substr($DOCFILEheader, 0, 8) != $magic) {
- $this->error('Expecting "'.getid3_lib::PrintHexBytes($magic).'" at '.$info['avdataoffset'].', found '.getid3_lib::PrintHexBytes(substr($DOCFILEheader, 0, 8)).' instead.');
- return false;
- }
- $info['fileformat'] = 'msoffice';
- $this->error('MS Office (.doc, .xls, etc) parsing not enabled in this version of getID3() ['.$this->getid3->version().']');
- return false;
- }
- }
|