Login   Register  
PHP Classes
elePHPant
Icontem

File: includes/getid3/module.misc.msoffice.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Karl Holz  >  WaldScan  >  includes/getid3/module.misc.msoffice.php  >  Download  
File: includes/getid3/module.misc.msoffice.php
Role: Auxiliary script
Content type: text/plain
Description: getID3 dependency
Class: WaldScan
Scan directories for files with certain extensions
Author: By
Last change:
Date: 1 year ago
Size: 1,565 bytes
 

Contents

Class file image Download
<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.archive.doc.php                                      //
// module for analyzing MS Office (.doc, .xls, etc) files      //
// dependencies: NONE                                          //
//                                                            ///
/////////////////////////////////////////////////////////////////


class getid3_msoffice extends getid3_handler
{

    function 
Analyze() {
        
$info = &$this->getid3->info;

        
fseek($this->getid3->fp$info['avdataoffset'], SEEK_SET);
        
$DOCFILEheader fread($this->getid3->fp8);
        
$magic "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1";
        if (
substr($DOCFILEheader08) != $magic) {
            
$info['error'][] = 'Expecting "'.getid3_lib::PrintHexBytes($magic).'" at '.$info['avdataoffset'].', found '.getid3_lib::PrintHexBytes(substr($DOCFILEheader08)).' instead.';
            return 
false;
        }
        
$info['fileformat'] = 'msoffice';

$info['error'][] = 'MS Office (.doc, .xls, etc) parsing not enabled in this version of getID3() ['.$this->getid3->version().']';
return 
false;

    }

}


?>