GetFileFormat example

$this->info['id3v2']['majorversion']  = ord($header[3]);
                    $this->info['id3v2']['minorversion']  = ord($header[4]);
                    $this->info['avdataoffset']          += getid3_lib::BigEndian2Int(substr($header, 6, 4), 1) + 10; // length of ID3v2 tag in 10-byte header doesn't include 10-byte header length                 }
            }

            // read 32 kb file data             fseek($this->fp, $this->info['avdataoffset']);
            $formattest = fread($this->fp, 32774);

            // determine format             $determined_format = $this->GetFileFormat($formattest($original_filename ? $original_filename : $filename));

            // unable to determine file format             if (!$determined_format) {
                fclose($this->fp);
                return $this->error('unable to determine file format');
            }

            // check for illegal ID3 tags             if (isset($determined_format['fail_id3']) && (in_array('id3v1', $this->info['tags']) || in_array('id3v2', $this->info['tags']))) {
                if ($determined_format['fail_id3'] === 'ERROR') {
                    fclose($this->fp);
                    
Home | Imprint | This part of the site doesn't use cookies.