filestack/mixins/CommonMixin.php
protected function sendGetContent($url, $security = null)
    {
        // sign url if security is passed in
        if ($security) {
            $url = $security->signUrl($url);
        }

        $response = $this->sendRequest('GET', $url);
        $status_code = $response->getStatusCode();

        // handle response
        if ($status_code !== 200) {
            throw new FilestackException($response->getBody(), $status_code);
        }

        $content = $response->getBody()->getContents();

        return $content;
    }
protected function sendGetContent($url, $security = null)
    {
        // sign url if security is passed in
        if ($security) {
            $url = $security->signUrl($url);
        }

        $response = $this->sendRequest('GET', $url);
        $status_code = $response->getStatusCode();

        // handle response
        if ($status_code !== 200) {
            throw new FilestackException($response->getBody(), $status_code);
        }

        $content = $response->getBody()->getContents();

        return $content;
    }
protected function sendGetContent ( $ url , $ security = null ) { // sign url if security is passed in if ( $ security ) { $ url = $ security -> signUrl ( $ url ) ; } $ response = $ this -> sendRequest ( 'GET' , $ url ) ; $ status_code = $ response -> getStatusCode ( ) ; // handle response if ( $ status_code !== 200 ) { throw new FilestackException ( $ response -> getBody ( ) , $ status_code ) ; } $ content = $ response -> getBody ( ) -> getContents ( ) ; return $ content ; }
Get the content of a file.

@param string            $url        Filestack file url
@param FilestackSecurity $security   Filestack security object if
security settings is turned on

@throws FilestackException   if API call fails, e.g 404 file not found

@return string (file content)
Get the content of a file .