public function downloadFileFromURL($url)
    {
        $request     = new \Google_Http_Request($url, 'GET', null, null);
        $httpRequest = $this->service->getClient()
           ->getAuth()
           ->authenticatedRequest($request);
        if ($httpRequest->getResponseHttpCode() == 200) {
            return $httpRequest->getResponseBody();
        } else {
            // An error occurred.
            return null;
        }
    }
public function downloadFileFromURL($url)
    {
        $request     = new \Google_Http_Request($url, 'GET', null, null);
        $httpRequest = $this->service->getClient()
           ->getAuth()
           ->authenticatedRequest($request);
        if ($httpRequest->getResponseHttpCode() == 200) {
            return $httpRequest->getResponseBody();
        } else {
            // An error occurred.
            return null;
        }
    }
public function downloadFileFromURL ( $ url ) { $ request = new \ Google_Http_Request ( $ url , 'GET' , null , null ) ; $ httpRequest = $ this -> service -> getClient ( ) -> getAuth ( ) -> authenticatedRequest ( $ request ) ; if ( $ httpRequest -> getResponseHttpCode ( ) == 200 ) { return $ httpRequest -> getResponseBody ( ) ; } else { // An error occurred. return null ; } }
Download a file from a url
@param $url
@return string|null
Download a file from a url