function stream_read($count) { if ($this->stream_eof()) { return false; } $ret = substr($this->file, $this->position, $count); $this->position += strlen($ret); return $ret; }