protected function getPartFromFile(&$part) { $start = $part['starting-pos']; $end = $part['ending-pos']; $body = ''; if ($end - $start > 0) { fseek($this->stream, $start, SEEK_SET); $body = fread($this->stream, $end - $start); } return $body; }