protected function _readStream($fp, $close = false)
    {
        $out = '';

        if (!is_resource($fp)) {
            return $out;
        }

        rewind($fp);
        while (!feof($fp)) {
            $out .= fread($fp, 8192);
        }

        if ($close) {
            fclose($fp);
        }

        return $out;
    }
protected function _readStream($fp, $close = false)
    {
        $out = '';

        if (!is_resource($fp)) {
            return $out;
        }

        rewind($fp);
        while (!feof($fp)) {
            $out .= fread($fp, 8192);
        }

        if ($close) {
            fclose($fp);
        }

        return $out;
    }
protected function _readStream ( $ fp , $ close = false ) { $ out = '' ; if ( ! is_resource ( $ fp ) ) { return $ out ; } rewind ( $ fp ) ; while ( ! feof ( $ fp ) ) { $ out .= fread ( $ fp , 8192 ) ; } if ( $ close ) { fclose ( $ fp ) ; } return $ out ; }
Read data from a stream.

@param resource $fp    An active stream.
@param boolean $close  Close the stream when done reading?

@return string  The data from the stream.
Read data from a stream .